python打包不能在其他电脑打开、找不到指定模块_pyinstaller打包移植到别的电脑报错OSError: [WinError 126] 找不到指定的模块。...

首先说一下我的环境 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] 找不到指定的模块。

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

3

OSError: [WinError 126] 找不到指定的模块。Failed to load dynlib/dll 一般这个错误是因为dll库有其他的依赖库未被找到,我们的这个libmxnet.dll 肯定有其他的依赖库未被找到,我们通过一个软件Dependency Walker 查找他的依赖库

我们看到那六个打问好的,在电脑上找到它大部分是在c盘 是我们gpu所用的库。

最终如下:其中应该有没有用的库,这里我没有仔细甄别。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值