PyInstaller打包异常问题

前几天在使用PyInstaller打包一个程序时,发现PyInstaller怎么用都显示一个错误提示:

PyInstaller cannot check for assembly dependencies.
 Please install pywin32_ctypes

 pip install pywin32_ctypes

1.pywin32_ctypes异常所致

开始时,以为是长时间不使用PyInstaller,所含pywin32_ctypes不异常破坏了,所以按照提示进行安装pywin32_ctypes。

C:\Users\Administrator>pip install pywin32_ctypes
Requirement already satisfied: pywin32_ctypes in d:\program files\python37\lib\site-packages (0.2.0)

提示已经安装过,没有办法只能先行把其pip uninstall pywin32_ctypes后,然后再重新安装;再使用PyInstaller打包,问题依旧存在。

PyInstaller cannot check for assembly dependencies.
 Please install pywin32_ctypes

 pip install pywin32_ctypes

2.PyInstaller顺坏所致

经过第一步后,开始怀疑是PyInstaller异常问题所致,只能重新卸载pip uninstall PyInstaller,完成再pip install PyInstaller.

等待安装完成,问题依然存在;

PyInstaller cannot check for assembly dependencies.
 Please install pywin32_ctypes

 pip install pywin32_ctypes

崩溃中... ..., 折腾好长时间,切换目录,都还是不行。

3.卸载PyInstaller

只能卸载PyInstaller,难不成这个tool有问题,pip uninstall PyInstaller;等待卸载完成; 直接在cmd出现好使了,这是什么鬼。

推测原因:

PyInstaller在同一PC上允许存在多个版本的,这个多个版本路径存在差异,又可能我没有就多个版本添加对应Path路径;

WINDOWS傻傻的找不到路径;就出现我上述的问题;

一般在使用PyInstaller时,就出现没有安装pywin32以及pywin32_ctypes两个包,请安装如下即可。而我这个问题就是特例啦!

pip install pywin32

pip install pywin32-ctypes

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章