-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'vtk' #552
Comments
ps, we did not find any of hook-vtk-?????.py or similar file names under pyinstaller/hook folder. So we changed the spec file directly. |
Hmm, looks like For the minimized version of your entry-point script, import sys
import sys,os
from PyQt5 import QtCore,QtWidgets
from PyQt5.QtWidgets import QFileDialog
from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor # <== report error when run the EXE
# from vedo import Plotter, Points,Arrow #,Mesh
#import Load_Data_Proc as Proc_Load # <== our pyd module
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
print("Hello world!")
#window = Proc_Load.Plot_App()
#app.aboutToQuit.connect(app.deleteLater) ## fix spyder run Qt app one time
#window.show()
#sys.exit(app.exec_()) it seems that adding Can you try adding |
Hi Rokm, We changed the import line to import vtkmoudules.xxx, then verything is fine now. Thank you very much for your quick response. Is there any way to fix it by pyinstaller natively? Regards, |
Hello,
After running pyinstaller against a python script with vtk import successfully, we tried the exe file with error:
“ModuleNotFoundError: No module named 'vtk'”
A minimal example file:
The script in error is in fact a caller which calls the pyd module that contains the compiled functions by cython. So there is no real action except the
__name__ == "__main__"
. All the rest are imports, see following;PyInstaller command:
Error:
Expected behavior
Run exe well
Screenshots
NA
Desktop (please complete the following information):
pyinstaller-hooks-contrib
: 2023.0 [ got from folder name, 2023.0.dist-info, not sure how to check it by command]** Addtional info **
Before running pyinstaller we changed Caller_proc.spec by adding:
which does not help at all
Thank you for your help in advance
Regards
DR,Ling
The text was updated successfully, but these errors were encountered: