简体   繁体   English

使用 pymeshlab 和 Pyinstaller 时导入错误

[英]Import error when using pymeshlab and Pyinstaller

I am currently writing a program using pymeshlab, which I would like to deploy using pyinstaller.我目前正在使用 pymeshlab 编写程序,我想使用 pyinstaller 进行部署。 After I deployed the program, I tried to run it and got the folowing error.部署程序后,我尝试运行它并收到以下错误。

[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!

After some search I found that the major problem must be in PyMeshLab.经过一番搜索,我发现主要问题必须在 PyMeshLab 中。 I am know running the following code,我知道运行以下代码,

import pymeshlab

def main():
  print('Hello World')

if __name__ == '__main__':
  main()

and I still get the error.我仍然得到错误。 Does anyone have an idea, how this can be fixed?有谁知道,如何解决这个问题?

I am using Ubuntu 22.04我正在使用 Ubuntu 22.04

What can be used instead of pyinstaller cx_freeze.可以用什么来代替pyinstaller cx_freeze。 Using cx_freeze the applications runs fine!使用 cx_freeze 应用程序运行良好!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM