pyinstaller打包錯誤,找不到指定程式

2021-10-01 23:37:31 字數 684 閱讀 5390

用pyinstaller打包指定程式報錯

traceback (most recent call last):

file "site-packages\pyinstaller\loader\rthooks\pyi_rth_win32comgenpy.py", line 47, in file "d:\python37-32\lib\site-packages\pyinstaller\loader\pyimod03_importers.py", line 627, in exec_module

exec(bytecode, module.__dict__)

file "site-packages\win32com\__init__.py", line 5, in importerror: dll load failed: 找不到指定的程式。

[8872] failed to execute script pyi_rth_win32comgenpy

我的環境是,win10,python3.7,pyinstaller3.5,程式中呼叫的包是matplotlib,pandas,numpy。嘗試過更新pyinstaller,加-p引數,公升級gensim等,都沒用。

改用python3.5,pip安裝pyinstaller和所需要的包。問題成功解決。可能是pyinstaller目前對python3.7的支援還不太好。

pyinstaller打包程式

python打包成exe檔案時,用的是pyinstaller 第一步安裝pyinstaller pip install pyinstaller第二步 pyinstaller f w i ico py其中 ico 是logo,py是你要打包的py檔案 我在打包時出現了struct.error unpa...

pyinstaller打包使用

pyinstaller manage.py 如果直接打包報錯,使用如下命令可以直接生成配置檔案 pyi makespec d manage.py生成的配置檔案格式如下 mode python coding utf 8 block cipher none a analysis impala etl.p...

pyinstaller 打包總結

pyinstaller 打包過程總結 安裝 pyinstaller 打包工具 pip3 install pyinstallerpyinstaller 打包命令不熟悉的小夥伴可點選這裡檢視喲 備註 以下涉及到的檔案名字main.py,請替換成自己的檔名 執行打包命令生成單獨的 exe 程式 pyins...