【发布时间】:2019-12-06 18:31:45
【问题描述】:
我正在尝试分发我创建的 Python 程序的可执行文件。 为此,我使用PyInstaller。
我使用带有 Python 3.7 的 Windows 7 Professional 程序在 PyCharm 中成功运行并产生预期结果。
如 PyInstaller 手册中所述,我创建了 dist 文件夹:
pyinstaller main.py
日志输出表明进程成功完成。
尝试从分发文件夹运行main.exe 时,会产生以下错误:
Traceback (most recent call last):
File "site-packages\PyInstaller\loader\rthooks\pyi_rth_certifi.py", line 11, i
n <module>
File "c:\users\tim\anaconda3\envs\timtf2_37\lib\site-packages\PyInstaller\load
er\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "ssl.py", line 98, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
[6236] Failed to execute script pyi_rth_certifi
【问题讨论】:
-
你能在 ssl.py 脚本中分享你所有的导入包名称吗
-
@shubham,我在分发文件夹中没有看到
ssl.py文件,只有一个_ssl.pyd。 -
你能告诉我你导入main.py的包是什么
-
我使用:
sqlalchemy, pandas, datetime, smtplib -
使用pyinstaller 3.4,我想它可能对你有帮助
标签: python pyinstaller