I got this error when I tried to make an .exe file from .py file with pyinstaller. The full error:
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')
I solve the problem. I only removed and installed again pyinstaller.