繁体   English   中英

使用pyinstaller和scipy模块将py文件转换为exe文件时出错。 知道可能是什么问题吗?

[英]Error when converting py file to exe file using pyinstaller and scipy module. Any idea what could be the problem?

我正在运行Python 3.6.4,操作系统Windows 10 Home 64位

这不是给我问题的原始代码,而是写了一个非常简单的代码来证明scipy给了我错误。

from scipy.optimize import fsolve
print('Hello World')
close_this = input('Press ENTER to close.')

然后,我使用以下cmd中的以下代码将该文件(hello.py)转换为exe文件。

pyinstaller -F Hello.py

我收到多个警告。 都说“找不到lib”

52530 WARNING: lib not found: libopenblas.JKAMQ5EVHIVCPXP2XZJB2RQPIN47S32M.gfortran-win32.dll dependency of c:\program files (x86)\python36-32\lib\site-packages\scipy\special\_ellip_harm_2.cp36-win32.pyd

然后,我运行了新创建的exe文件(hello.exe)。 它闪烁了一秒钟,立即崩溃了。 它给我的错误是它找不到scipy模块。

File "Hello.py", line 1, in <module>
...
ImportError: DLL load faild: The specified module could not be found.  

当我尝试转换不带第1行的python文件时(导入scipy)。 我没有错误,可以正确转换为exe。

据我所知。 我感谢您提供的任何帮助。 :)

我的解决方案是仅更新PyInstaller。

https://pyinstaller.readthedocs.io/zh-CN/v3.3.1/installation.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM