首先说一下我的环境 win10 python3.6.4
下面是我安装库 版本 pip list
Package Version
--------------- --------------
altgraph 0.15
certifi 2018.4.16
chardet 3.0.4
future 0.16.0
GDAL 2.2.4
graphviz 0.8.4
idna 2.6
macholib 1.9
mxnet-cu90 1.3.0b20180724
numpy 1.14.5
opencv-python 3.4.2.17
pandas 0.23.3
pefile 2017.11.5
Pillow 5.2.0
pip 18.0
PyInstaller 3.3.1
pypiwin32 223
python-dateutil 2.7.3
pytz 2018.5
pywin32 223
requests 2.18.4
setuptools 28.8.0
six 1.11.0
urllib3 1.22
其中深度学习库mxnet用的cu90
2 另一台电脑也是win10 安装了的anconda,没装什么库纯属自带
结果报错
Traceback (most recent call last):
File "site-packages\PyInstaller\loader\pyiboot01_bootstrap.py", line 149, in __init__
File "ctypes\__init__.py", line 348, in __init__
OSError: [WinError 126] 找不到指定的模块。
File "site-packages\PyInstaller\loader\pyiboot01_bootstrap.py", line 149, in __init__
File "ctypes\__init__.py", line 348, in __init__
OSError: [WinError 126] 找不到指定的模块。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "ship_detect.py", line 10, in
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "d:\program files\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
File "inference_coord.py", line 11, in
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "d:\program files\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
File "site-packages\mxnet\__init__.py", line 24, in
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "d:\program files\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
File "site-packages\mxnet\context.py", line 24, in
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "d:\program files\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
File "site-packages\mxnet\base.py", line 197, in
File "site-packages\mxnet\base.py", line 188, in _load_lib
File "site-packages\PyInstaller\loader\pyiboot01_bootstrap.py", line 151, in __init__
__main__.PyInstallerImportError: Failed to load dynlib/dll 'E:\\ship_detect\\mxnet\\libmxnet.dll'. Most probably this dynlib/dll was not found when the application was frozen.
[5748] Failed to execute script ship_detect
File "ship_detect.py", line 10, in
File "
File "
File "
File "d:\program files\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
File "inference_coord.py", line 11, in
File "
File "
File "
File "d:\program files\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
File "site-packages\mxnet\__init__.py", line 24, in
File "
File "
File "
File "d:\program files\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
File "site-packages\mxnet\context.py", line 24, in
File "
File "
File "
File "d:\program files\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
File "site-packages\mxnet\base.py", line 197, in
File "site-packages\mxnet\base.py", line 188, in _load_lib
File "site-packages\PyInstaller\loader\pyiboot01_bootstrap.py", line 151, in __init__
__main__.PyInstallerImportError: Failed to load dynlib/dll 'E:\\ship_detect\\mxnet\\libmxnet.dll'. Most probably this dynlib/dll was not found when the application was frozen.
[5748] Failed to execute script ship_detect
3
OSError: [WinError 126] 找不到指定的模块。Failed to load dynlib/dll 一般这个错误是因为dll库有其他的依赖库未被找到,我们的这个libmxnet.dll 肯定有其他的依赖库未被找到,我们通过一个软件Dependency Walker 查找他的依赖库
我们看到那六个打问好的,在电脑上找到它大部分是在c盘 是我们gpu所用的库。
最终如下:其中应该有没有用的库,这里我没有仔细甄别。