No module named form

30 views
Skip to first unread message

Luca Bertolotti

unread,
Mar 24, 2022, 7:52:16 AM3/24/22
to PyInstaller
Hello
i don't know what happen 
i have a simple program with a form , the main file is :

import sys
from PyQt5 import *
from PyQt5 import  QtWidgets
from form import Form
app = QtWidgets.QApplication(sys.argv)
form = Form()
form.show()
app.exec_()

Than i run pyinstaller as usual :
pyinstaller -- onefile --windowed main.py (As i do a lot of time), 
when i run the exe i get 
ModuleNotFoundError: No module named 'form'
The file form is in the same folder of the main file.
I use python 3.8.6
and pyqt 5.15.6
Any Idea
Thanks

Luca Bertolotti

unread,
Mar 24, 2022, 11:31:25 AM3/24/22
to PyInstaller
I have solved adding the paths=( location of the missing file) is the first time that I have to do it
Luca
Reply all
Reply to author
Forward
0 new messages