Python中文
首页
教程
问答
标签
搜索
登录
注册
python snap7 windows-找不到snap7库
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我试图用python-snap7 0.4包装器安装snap7(从S7-1200中读取),但我总是得到一个带有以下简单代码的回溯。</p> <pre><code>from time import sleep import snap7 from snap7.util import * import struct plc = snap7.client.Client() </code></pre> <p>回溯:</p> <pre><code> >>> Traceback (most recent call last): File "Y:\Lonnox\Projekte\Bibliothek\Python und SPS\S7-1200 Test.py", line 6, in <module> plc = snap7.client.Client() File "C:\Python34\lib\site-packages\snap7\client.py", line 30, in __init__ self.library = load_library() File "C:\Python34\lib\site-packages\snap7\common.py", line 54, in load_library return Snap7Library(lib_location).cdll File "C:\Python34\lib\site-packages\snap7\common.py", line 46, in __init__ raise Snap7Exception(msg) snap7.snap7exceptions.Snap7Exception: can't find snap7 library. If installed, try running ldconfig </code></pre> <p>安装snap7和python wrapper的步骤如下:</p> <ol> <li>从sourceforge下载snap7并将snap7.dll和snap7.lib复制到windows 8的system32文件夹</li> <li>使用pip Install python-snap7安装包装器</li> </ol> <p>如何在windows上正确安装snap7?</p> <p>[pip安装日志][1]</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>试试这个: 在snap7文件夹中搜索snap7.dll和snap7.lib文件 将snap7.dll和snap7.lib复制到“C://PythonXX/site packages/snap7”目录中,然后再次运行代码。您可以在同一目录下的common.py文件中找到这一点。</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
无法使用Django/mongoengine连接到MongoDB(身份验证失败)
4 回答
无法使用Django\u mssql\u后端迁移到外部hos
1 回答
无法使用Django&Python3.4连接到MySql
5 回答
无法使用Django+nginx上载媒体文件
6 回答
无法使用Django1.6导入名称模式
4 回答
无法使用Django1.7和mongodb登录管理站点
3 回答
无法使用Djangoadmin创建项目,进程使用了错误的路径,因为我事先安装了错误的Python
4 回答
无法使用Djangockedi验证CBV中的字段
7 回答
无法使用Djangocketditor上载图像(错误400)
9 回答
无法使用Djangocron进行函数调用
3 回答
无法使用Djangofiler djang上载文件
5 回答
无法使用Djangokronos
7 回答
无法使用Djangomssql provid
8 回答
无法使用Djangomssql连接到带有Django 1.11的MS SQL Server 2016
6 回答
无法使用Djangomssq迁移Django数据库
4 回答
无法使用Djangonox创建用户
1 回答
无法使用Djangopyodb从Django查询SQL Server
3 回答
无法使用Djangopython3ldap连接到ldap
4 回答
无法使用Djangoredis连接到redis
5 回答
无法使用Django中的FK创建新表
1 回答