ubuntu installs pyqt5 and reports an error xcb cannot find pyinstaller to package open3d and reports an error

2个错误
QObject::moveToThread: Current thread (0x25b5c20) is not the object’s thread (0x5ce7ee0).
Cannot move to target thread (0x25b5c20)

qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “/home/dong/miniconda3/envs/fastdeploy/lib/python3.8/site-packages/cv2/qt/plugins” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.

Aborted (core dumped)

chatgpt said so

This error may have two different problems, and I will give solutions separately:

QObject::moveToThread: Current thread (0x25b5c20) is not the object's thread (0x5ce7ee0). Cannot move to target thread (0x25b5c20)
This error may be because you are trying to move an object to a thread it does not belong to. To fix this, you need to make sure the object is created in the thread you want to move it, or use signals and slots to communicate between threads.

qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “/home/dong/miniconda3/envs/fastdeploy/lib/python3.8/site-packages/cv2/qt/plugins” even though it was found . This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem
. You need to ensure that the required plugins are installed and that the application is configured to use the correct plugins. You can try to reinstall the application to resolve this issue. If reinstalling doesn't work, you may need to add the plugin path to your system environment variables. Also, you can try installing other platform plugins such as "wayland" or "eglfs" and see if that fixes the problem.

After fixing these issues, if the application still crashes with an "Aborted (core dumped)" message, check the application log to find the cause. There may be other issues causing the application to crash.

But my solution is
the first problem, uninstall opencv-python install pip install opencv-python==4.1.2.30

The second question, first set the debug environment variable of qt so that we can find the problem
export QT_DEBUG_PLUGINS=1

The problem is found (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)
In fact, I also installed
conda config --add channels conda-forge
conda install libxcb xcb-util
but it feels useless or report error

The final solution is sudo apt-get install libxcb-xinerama0

报错 dongdong shen
pyimod03_ctypes.PyInstallerImportError: Failed to load dynlib/dll ‘/home/dong/don/tmini_deploy/dist/main/open3d/cpu/pybind.cpython-38-x86_64-linux-gnu.so’. Most likely this dynlib/dll was not found when the application was frozen.
[25489] Failed to execute script ‘main’ due to unhandled exception!

Obviously the file exists

Solve sudo apt-get install libc++1

Guess you like

Origin blog.csdn.net/qq_33228039/article/details/130360473