我正在研究python上的一个小程序。我正在使用pyinstaller制作二进制文件(windows)。该程序使用libtorrent库。这样编译的可执行文件在我的机器上运行(Windows 8)但不在其他机器上运行机器(Windows 10)。我得到一个" ImportError:DLL"错误。 我为我的问题搜索了一个解决方案,但我找不到任何帮助。我们将不胜感激。
执行编译二进制文件时报告错误(pyinstaller上的调试模式)
H:\main>main.exe
PyInstaller Bootloader 3.x
LOADER: executable is H:\main\main.exe
LOADER: homepath is H:\main
LOADER: _MEIPASS2 is NULL
LOADER: archivename is H:\main\main.exe
LOADER: No need to extract files to run; setting extractionpath to homepath
LOADER: SetDllDirectory(H:\main)
LOADER: Already in the child - running user's code.
LOADER: Python library: H:\main\python35.dll
LOADER: Loaded functions from Python library.
LOADER: Manipulating environment (sys.path, sys.prefix)
LOADER: Pre-init sys.path is H:\main\base_library.zip;H:\main
LOADER: sys.prefix is H:\main
LOADER: Setting runtime options
LOADER: Initializing python
LOADER: Overriding Python's sys.path
LOADER: Post-init sys.path is H:\main\base_library.zip;H:\main
LOADER: Setting sys.argv
LOADER: setting sys._MEIPASS
LOADER: importing modules from CArchive
LOADER: extracted struct
LOADER: callfunction returned...
LOADER: extracted pyimod01_os_path
LOADER: callfunction returned...
LOADER: extracted pyimod02_archive
LOADER: callfunction returned...
LOADER: extracted pyimod03_importers
LOADER: callfunction returned...
LOADER: Installing PYZ archive with Python modules.
LOADER: PYZ archive: out00-PYZ.pyz
LOADER: Running pyiboot01_bootstrap.py
LOADER: Running pyi_rth_qt5.py
LOADER: Running pyi_rth_qt5plugins.py
LOADER: Running main.py
Traceback (most recent call last):
File "main.py", line 1, in <module>
File "c:\users\sreelal\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
File "piratebayscraping.py", line 3, in <module>
File "c:\users\sreelal\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
File "site-packages\libtorrent\__init__.py", line 1, in <module>
File "c:\users\sreelal\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 573, in load_module
ImportError: DLL load failed: The specified module could not be found.
Failed to execute script main
LOADER: OK.
LOADER: Cleaning up Python i