[英]Pyinstaller Error when converting .py to .exe
Whenever I try to put any .py file into pyinstaller I always get an error TypeError: expected str, bytes or os.PathLike object, not NoneType
I havent been able to find any fixes that make sense. 每当我尝试将任何.py文件放入pyinstaller时,我总会得到一个错误
TypeError: expected str, bytes or os.PathLike object, not NoneType
我还没有找到任何有意义的修复。
Ive tried reinstalling pyinstaller and different files. 我试过重新安装pyinstaller和不同的文件。
I dont think there is any code problems since this occurs no matter what file I use 我不认为有任何代码问题,因为无论我使用什么文件都会发生这种情况
Expected: a compiled exe file. 预期:编译的exe文件。
Actual Result: TypeError: expected str, bytes or os.PathLike object, not NoneType
error and nothing is compiled 实际结果:
TypeError: expected str, bytes or os.PathLike object, not NoneType
错误,没有编译任何内容
First, uninstall pyinstaller completely with pip uninstall pyinstaller
then delete C:/Users/<Username>/AppData/Roaming/Pyinstaller
directory. 首先,使用
pip uninstall pyinstaller
uninstall pyinstaller完全pip uninstall pyinstaller
然后删除C:/Users/<Username>/AppData/Roaming/Pyinstaller
目录。
Next Install pyinstaller with pip install -U pyinstaller
. 下一步使用
pip install -U pyinstaller
。
If still shows the same error try to replace bindepend.py
from here in <Python path>\\Lib\\site-packages\\PyInstaller\\depend
directory. 如果仍然显示同样的错误尝试更换
bindepend.py
从这里在<Python path>\\Lib\\site-packages\\PyInstaller\\depend
目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.