用python写的程序生成exe以后,在自己电脑(win 7 32位系统)上可以正常运行,在别人的电脑上win10也可以正常运行,但是在公司电脑上报错。
没法传图片, 简单写一下错误描述:
Import Error:
importing the multiarray numpy extension module failed.Most
likely you are trying to import a failed build of numpy.
If you're wording with a numpy git repo, try 'git clean.......'
Original error was :DLL load failed :找不到指定的模块
程序第一行是 import numpy as np
之前在公司电脑上生成过的能正常运行的exe,现在也报上述错误,
估计是电脑缺什么文件吧
请大侠指点,没有金币奉送,只能拜谢.
1.可能是缺失了numpy库,试下重新打包下,加上-p 库路径 参数;如:pyinstaller -F -p d:\mymodule\lib; c:\mypy\mypy.py
2.尝试使用19.2版本的setuptools
pip uninstall setuptools
pip install setuptools==19.2
3.pyinstaller换成 cx_Freeze 或者py2exe
使用pyinstaller的-D命令打包成有很多依赖文件的文件夹形式就能跑了。