我正在尝试从Python中名为“Power factory”的prgoram导入一个模块。Power factory文件所在的文件夹如下所示:
我编写了导入powerfactory模块的脚本,如下所示:
import sys
sys.path.append("PAth of folder")
import powerfactory as pf
当我运行上述代码时,它抛出以下错误:
ImportError: DLL load failed while importing powerfactory: The specified module could not be found.
我将power factory文件夹中的.dll文件复制到Python dll文件夹中,但运气不好。谁能帮我一下,我哪里出错了
我在网上搜索时发现了这个(从here)
从digsilent文件夹复制.dll文件,例如
Program Files\DIgSILENT\PowerFactory 2020 SP2A\Python\3.8\boost_python38-vc141-mt-x64-1_68.dll
并将.dll文件直接放入系统中
将其保存到
C:\Windows\System32
文件夹中。 &; 还将其保存到C:\Windows\SysWOW64
文件夹中你该走了
相关问题 更多 >
编程相关推荐