英文:
Pyinstaller error Failed to execute script 'pyiboot01_bootstrap' due to unhandled exception! when I tried to make an app from .py file
问题
以下是您提供的内容的中文翻译:
我在尝试使用pyinstaller从.py文件创建.exe文件时遇到了此错误。
完整错误信息:
回溯(最近的调用最后):
File "PyInstaller\loader\pyimod02_importers.py", line 22, in <module>
File "pathlib.py", line 14, in <module>
File "urllib\parse.py", line 40, in <module>
ModuleNotFoundError: 没有名为'ipaddress'的模块
回溯(最近的调用最后):
File "PyInstaller\loader\pyiboot01_bootstrap.py", line 17, in <module>
ModuleNotFoundError: 没有名为'pyimod02_importers'的模块
[3236] 由于未处理的异常,无法执行脚本'pyiboot01_bootstrap'!```
我使用pyinstaller但从未遇到错误。
我使用的命令是:
pyinstaller --onefile main.py
Pyinstaller版本:5.8.0
Python版本:3.11.4
Python文件代码:
print('h')
<details>
<summary>英文:</summary>
I got this error when I tried to make an .exe file from .py file with pyinstaller.
The full error:
```[3236] Module object for pyimod02_importers is NULL!
Traceback (most recent call last):
File "PyInstaller\loader\pyimod02_importers.py", line 22, in <module>
File "pathlib.py", line 14, in <module>
File "urllib\parse.py", line 40, in <module>
ModuleNotFoundError: No module named 'ipaddress'
Traceback (most recent call last):
File "PyInstaller\loader\pyiboot01_bootstrap.py", line 17, in <module>
ModuleNotFoundError: No module named 'pyimod02_importers'
[3236] Failed to execute script 'pyiboot01_bootstrap' due to unhandled exception!
I used pyinstaller but I never get an error.
The command what I used:
pyinstaller --onefile main.py
Pyinstaller version: 5.8.0
Python version: 3.11.4
The python file code:
print('h')
答案1
得分: 0
我解决了这个问题。我只是删除然后重新安装了pyinstaller。
英文:
I solve the problem. I only removed and installed again pyinstaller.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论