我正在尝试使用PyInstaller将我的应用程序构建到.exe,但是看起来PyQt3D模块并不导入PyQt3D模块。用PyInstaller用Qt3D构建应用程序是不可能的,或者我需要一些额外的配置?我尝试在hidden-imports中添加PyQt3D模块,但仍然有错误:
Traceback (most recent call last):
File "***\main.py", line 1, in <module>
from PyQt5 import QtWidgets, Qt3DCore, Qt3DExtras, Qt3DRender, QtGui, QtCore
ModuleNotFoundError: No module named 'PyQt5.Qt3DInput'
[13512] Failed to execute script main我向PyInstaller传递了--隐藏-导入PyQt5.Qt3DInput。不过,我还是有这样的想法:
Qt3D.Renderer.Jobs: unsupported format encountered (stl)当我在PyCharm中运行我的应用程序时,一切正常。也许有人能帮上忙?
发布于 2019-08-30 17:42:08
要开始使用setSource()导入模型,我需要向PyQt5添加PyQt5/Qt/plugins/geometryloaders。因此,构建一个文件PyQt3D应用程序的完整命令是:
pyinstaller %input_file% --onefile --hidden-import PyQt5.Qt3DInput --add-data "venv/Lib/site-packages/PyQt5/Qt/plugins/geometryloaders";"PyQt5/Qt/plugins/geometryloaders"https://stackoverflow.com/questions/57713913
复制相似问题