首页 > 解决方案 > 安装成功后IfxPy模块导入错误

问题描述

我在安装 IfxPy 时遇到问题。操作系统为windows 64位,运行64位版本的Python 3.7.4。在 pip 安装车轮文件 IfxPy-3.0.3-cp37-cp37m-win_amd64.whl 之后 - https://pypi.org/project/IfxPy/#files 来自解释器的 pip list 命令或 help(modules) 命令显示模块已安装:

>>> help("modules") 
Please wait a moment while I gather a list of all available modules... IfxPy [...other modules...]

我试图找到模块的位置,它是

>>> imp.find_module('IfxPy') (<_io.BufferedReader name='C:\\Python\\lib\\site-packages\\IfxPy.pyd'>,
'C:\\Python\\lib\\site-packages\\IfxPy.pyd', ('.pyd', 'rb', 3))

PATH 环境变量包含上述路径。但是,当我尝试从 IDLE 解释器导入模块时,出现错误:

>>> import IfxPy 
Traceback (most recent call last):  
 File "<pyshell#6>", line 1, in <module>
     import IfxPy ImportError: DLL load failed: The specified module could not be  found.

错误的潜在来源可能是什么?如何解决?感谢帮助。

标签: python

解决方案


推荐阅读