使用pymeshlab和Pyinstaller导入报错
Import error when using pymeshlab and Pyinstaller
我目前正在使用 pymeshlab 编写程序,我想使用 pyinstaller 进行部署。部署程序后,我尝试 运行 它并得到以下错误。
[78981] Module object for struct is NULL!
Traceback (most recent call last):
File "struct.py", line 13, in <module>
ModuleNotFoundError: No module named '_struct'
[78981] Module object for pyimod02_archive is NULL!
Traceback (most recent call last):
File "PyInstaller/loader/pyimod02_archive.py", line 27, in <module>
ModuleNotFoundError: No module named 'struct'
[78981] Module object for pyimod03_importers is NULL!
Traceback (most recent call last):
File "PyInstaller/loader/pyimod03_importers.py", line 23, in <module>
ModuleNotFoundError: No module named 'pyimod02_archive'
Traceback (most recent call last):
File "PyInstaller/loader/pyiboot01_bootstrap.py", line 17, in <module>
ModuleNotFoundError: No module named 'pyimod03_importers'
[78981] Failed to execute script 'pyiboot01_bootstrap' due to unhandled exception!
经过一番搜索,我发现主要问题一定是在PyMeshLab。我知道运行宁下面的代码,
import pymeshlab
def main():
print('Hello World')
if __name__ == '__main__':
main()
但我仍然收到错误。有谁知道如何解决这个问题?
我正在使用 Ubuntu 22.04
可以使用什么来代替 pyinstaller cx_freeze。使用 cx_freeze 应用程序运行良好!
我目前正在使用 pymeshlab 编写程序,我想使用 pyinstaller 进行部署。部署程序后,我尝试 运行 它并得到以下错误。
[78981] Module object for struct is NULL!
Traceback (most recent call last):
File "struct.py", line 13, in <module>
ModuleNotFoundError: No module named '_struct'
[78981] Module object for pyimod02_archive is NULL!
Traceback (most recent call last):
File "PyInstaller/loader/pyimod02_archive.py", line 27, in <module>
ModuleNotFoundError: No module named 'struct'
[78981] Module object for pyimod03_importers is NULL!
Traceback (most recent call last):
File "PyInstaller/loader/pyimod03_importers.py", line 23, in <module>
ModuleNotFoundError: No module named 'pyimod02_archive'
Traceback (most recent call last):
File "PyInstaller/loader/pyiboot01_bootstrap.py", line 17, in <module>
ModuleNotFoundError: No module named 'pyimod03_importers'
[78981] Failed to execute script 'pyiboot01_bootstrap' due to unhandled exception!
经过一番搜索,我发现主要问题一定是在PyMeshLab。我知道运行宁下面的代码,
import pymeshlab
def main():
print('Hello World')
if __name__ == '__main__':
main()
但我仍然收到错误。有谁知道如何解决这个问题?
我正在使用 Ubuntu 22.04
可以使用什么来代替 pyinstaller cx_freeze。使用 cx_freeze 应用程序运行良好!