欢迎访问 生活随笔!

ag凯发k8国际

当前位置: ag凯发k8国际 > 编程语言 > python >内容正文

python

python打包不能在其他电脑打开、找不到指定模块,pyinstaller打包移植到别的电脑报错oserror: [winerror 126] 找不到指定的模块。... -ag凯发k8国际

发布时间:2024/10/12 python 29 豆豆

首先说一下我的环境 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所用的库。

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

总结

以上是ag凯发k8国际为你收集整理的python打包不能在其他电脑打开、找不到指定模块,pyinstaller打包移植到别的电脑报错oserror: [winerror 126] 找不到指定的模块。...的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得ag凯发k8国际网站内容还不错,欢迎将ag凯发k8国际推荐给好友。

  • 上一篇:
  • 下一篇:
网站地图