1、qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/lib/python3.7/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.
//or//
QObject::moveToThread: Current thread (0xe38c70) is not the object's thread (0x1ab6aa0).
Cannot move to target thread (0xe38c70)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/lib/python3.7/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.
答:
sudo apt-get install python3-pyqt5
sudo apt-get install libxcb-xinerama0
sudo pip3 install pyqt5
sudo pip3 install opencv-python==3.4.10.35
或者删除/usr/lib/python3.7/site-packages/cv2/qt/目录下的plugin,如果是conda环境,就在conda环境下找,我的是/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/cv2/qt/,第一种方法有其他问题,我用第二种方法没出现问题
2、QFactoryLoader::QFactoryLoader() looking at "/home/xiaofeisong/anaconda3/envs/pointnetgpd/bin/xzcat"
"Failed to extract plugin meta data from '/home/xiaofeisong/anaconda3/envs/pointnetgpd/bin/xz'"
pip install opencv-python-headless
3、子系统运行sudo apt-get update时,出现下面的错误:
E: Release file for https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 9h 17min 39s). Updates for this repository will not be applied.
E: Release file for https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 9h 19min 18s). Updates for this repository will not be applied.
E: Release file for https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 9h 16min 12s). Updates for this repository will not be applied.
可以观察下子系统时间和windows时间是否一致,如果不一致,运行下面的语句:
sudo hwclock --hctosys
让子系统时间和windows时间一致,就没问题了。
4、sudo apt-date update时出现下面错误:
W: Conflicting distribution: https://debian.opennms.org stable Release (expected stable but got opennms-30)
解决方法:
sudo gedit /etc/apt/sources.list
将里面的deb https://debian.opennms.org/ stable main注释掉,加上deb http://debian.opennms.org/ opennms-30 main
5、sudo apt-get update时遇到下面的错误:
Err:4 http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial InRelease
403 Forbidden [IP: 52.92.34.161 80]
Get:6 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 InRelease [1484 B]
Hit:7 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu bionic InRelease
Hit:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Get:9 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease [88.7 kB]
Get:10 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease [83.3 kB]
Get:11 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease [88.7 kB]
Hit:12 https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/amd64 InRelease
Hit:13 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64 InRelease
Hit:14 https://librealsense.intel.com/Debian/apt-repo bionic InRelease
Hit:15 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
Ign:5 https://debian.opennms.org opennms-30 InRelease
Hit:16 https://debian.opennms.org opennms-30 Release
Reading package lists... Done
E: Failed to fetch http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo/dists/xenial/InRelease 403 Forbidden [IP: 52.92.34.161 80]
E: The repository 'http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
可以先参考Apt服务器被分解/关闭,给出403禁止访问·问题 #9349 ·英特尔真实感/自由感 (github.com)
如果方法不行,打开etc/at/sources.list.d文件下的realsense-public.list,将
deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main注释掉
sudo gedit /etc/apt/sources.list.d/realsense-public.list
这方法其实也就相当于把报错的部分注释掉
6、当我在conda环境下运行PointNetGPD的代码时,遇见了下面的错误:
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Aborted
我找了很久,试了很多方法,参考了下面链接的方法QObject::moveToThread: Current thread (0x55c07be39a60) is not the object's thread (0x55c07c164490). Cannot move to target thread (0x55c07be39a60) · Issue #11 · Yuliang-Liu/Curve-Text-Detector (github.com)
opencv-python的版本太高的话,在ubuntu的conda环境下可能无法使用,因此,我先卸载了pyqt和opencv-python,然后重新安装:
conda install pyqt==5.9.2
pip install opencv-python==4.1.0.25
我试了这个是没报错了,但是这个opencv-python版本不一定就能正确使用,上面的链接中其他人才成功的pyqt和opencv-python版本叶可以尝试下可以尝试,
7、ModuleNotFoundError: No module named 'mayavi'
参考:python - Ipython error " No module named 'mayavi' " - Stack Overflow
如果不是在anaconda环境下,
pip install mayavi
如果是在anaconda环境下,你必须进入你的anaconda目录中的文件夹并使用此命令:
cd bin
./pip install mayavi
或者
conda install mayavi -c conda-forge
8、AttributeError: type object 'DialogCode' has no attribute 'Accepted'
错误通常和pyQT组件版本有关,特别是在mayavi使用时会出现该错误。
可以重装pyqt,或者
pip install pyqt5-tools
在跑一下代码是否有错误。
9.ImportError: cannot import name 'BinaryImage' from 'perception'
找到报错的文件,然后将from perception import BinaryImage改成from autolab_core import BinaryImage
10、ImportError: cannot import name 'CameraIntrinsics' from 'perception'
from perception import CameraIntrinsics
改成 from autolab_core import CameraIntrinsics
11、ImportError: cannot import name 'ColorImage' from 'perception'
参考:Unable to import visualization · Issue #12 · BerkeleyAutomation/visualization (github.com)
和前面几个类似,都是把perception改成autolab_core。
12、ImportError: cannot import name 'ObjectRender' from 'perception'
我在9~11的错误改成autolab_core后,发现ObjectRender也无法导入,我看到有代码是直接注释掉的,所以我也直接注释掉。
13、ImportError: cannot import name 'RenderMode' from 'perception'
CameraIntrinsics, BinaryImage, ColorImage, DepthImage都将文件引用模块的perception改成autolab_core,直接删除ObjectRender模块,rendermode则是将perception改成meshpy
14、SyntaxError: trailing comma not allowed without surrounding parentheses
检查报错的地方是否多了什么符号,我的是多加了逗号。
15、 ValueError: PyCapsule_GetPointer called with incorrect name
参考:ROS查看节点图rqt_graph报错ValueError: PyCapsule_GetPointer called with incorrect name_六五酥的博客-CSDN博客_ros查看节点图
pyqt5版本过高的问题。
16、ModuleNotFoundError: No module named 'skbuild'
pip3 install --upgrade pip
pip install scikit-build
16、 当我在安装pointnet2运行时python3 setup.py install
出现了下面的错误:
AttributeError: module 'dill' has no attribute 'extend'
我开始参考了下面的方法:python - AttributeError: module 'dill' has no attribute 'extend' - Stack Overflow
然而问题并没有解决,不过看到作者的回答,估计是dill的问题,如果上面的方法无法解决问题的话,可以尝试卸载重新安装dill。(直接使用pip3 install dill貌似不行)
pip3 uninstall dill
pip3 install dill==0.3.5.1
17、ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
python-pcl 0.3.0rc1 requires nose, which is not installed.
这种错误就是提示缺什么就安装什么
pip3 install nose
18、 ModuleNotFoundError: No module named 'yaml'
pip install PyYAML
19、 ModuleNotFoundError: No module named 'cv2'
pip install opencv-python
20、UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 658: illegal multibyte
找到报错的地方,加上
,encoding='utf-8'
21、 RemoveError: 'setuptools' is a dependency of conda and cannot be removed from
conda's operating environment.
卸载setuptools
pip uninstall setuptools
再更新conda
conda update --force conda
最后安装
conda install setuptools
显示successfully
2 2、离线安装pytorch
Index of /anaconda/cloud/pytorch/linux-64/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror 下载对应的pytorch版本,之前因为pip安装的有问题,conda安装网络不行,尝试离线安装。
我下载的是下面的,按照python、cuda、cudnn版本下载。
pytorch-1.12.0-py3.9_cuda11.6_cudnn8.3.2_0.tar.bz2
conda install --use-local pytorch-1.12.0-py3.9_cuda11.6_cudnn8.3.2_0.tar.bz2
23 Exception: pyglet 2.0.0 requires Python 3.8 or newer.
当我运行代码时,出现这个错误,考虑到重新创建conda环境太麻烦,我选择卸载pyglet,重新安装低版本的pyglet。
pip uninstall pyglet
pip install pyglet==1.5.9
23 、ModuleNotFoundError: No module named 'vtkIOParallelPython'参考:No module named ‘vtkIOParallelPython‘_wzq_mango的博客-CSDN博客
conda install jsoncpp=1.8.3
24、AttributeError: type object 'DialogCode' has no attribute 'Accepted'
pip install pyqt5
25 AssertionError
QLibraryPrivate::unload succeeded on "/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/PyQt5/Qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so"
QLibraryPrivate::unload succeeded on "/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/PyQt5/Qt5/plugins/platformthemes/libqgtk3.so"
QLibraryPrivate::unload succeeded on "/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
QLibraryPrivate::unload succeeded on "Xcursor" (faked)
可以把提示的lib***.so文件放在运行文件的目录里面再试一下。
26 error: XDG_RUNTIME_DIR not set in the environment.
export XDG_RUNTIME_DIR=$PATH:/tmp/runtime-xiaofeisong
27 WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable
下载songyb/autolab_core (gitee.com)
然后放到catkin_ws之类的工作空间的src目录下面,在catkin_ws工作空间下编译
catkin_make
source devel/setup.bash
28 运行pointnetgpd的训练代码时, python main_1v.py --epoch 200 --mode train --batch-size 1
UserWarning: This DataLoader will create 32 worker processes in total. Our suggested max number of worker in current system is 20, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
将num_workers修改到低于20,
29 ImportError: cannot import name ‘imread’ from 'scipy.misc’
将from scipy.misc import imread中的scipy.misc改为imageio
30 NameError: name 'pcl' is not defined
import pcl
31 fatal: not a git repository (or any parent up to mount point /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
git init
32 ImportError: cannot import name 'ParameterSource' from 'click.core'
该错误最常见的原因是black模块的版本过时, 升级black模块版本
pip install black --upgrade
33.运行pointnetgpd时出现AttributeError: 'AntipodalGraspSampler' object has no attribute 'generate_grasps_score',lianghongzhuo和Hymwgk的dex-net、meshpy都是已经修改过的,有所不同,需要改动。
34. error while loading shared libraries: libboost_filesystem.so.1.62.0: cannot open shared object file: No such file or directoryhttps://blog.csdn.net/alen_feng/article/details/117423290#:~:text=%E5%8F%AF%E8%83%BD%E6%9C%89%E4%BE%9D%E8%B5%96%E5%BA%93%EF%BC%8C%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%E8%BF%99%E9%87%8C%E5%91%BD%E4%BB%A4%E5%AE%89%E8%A3%85%20sudo%20apt-get%20install%20libboost-all-dev,%E5%AE%89%E8%A3%85%20boost%20%E5%BA%93%EF%BC%8C%E5%87%86%E5%A4%87%E7%9A%84%E7%89%88%E6%9C%AC%E6%98%AF%201.65%20%EF%BC%8C%E7%89%88%E6%9C%AC%E7%95%A5%E4%BD%8E%E3%80%82
sudo apt install libboost-system-dev
sudo apt-get install libboost-all-dev
35. error while loading shared libraries: libboost_regex.so.1.62.0: cannot open shared object file: No such file or directory
libboost-regex1.62.0_1.62.0+dfsg-5_amd64.deb
sudo apt-get install libboost-regex1.62.0
36.error while loading shared libraries:libboost_thread.so.1.62.0: cannot open shared object file: No such file or directory
sudo apt-get install libboost-thread1.62.0
34-36类似的错误可以看Packages for Linux and Unix - pkgs.org
在里面搜索缺少的库,
搜出来结果,按照自己电脑选择,我的是amd64,
可以手动下载安装,不过也可以直接安装
37.Traceback (most recent call last):
File "/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/pyface/base_toolkit.py", line 219, in import_toolkit
toolkit_object = plugin.load()
File "/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 208, in load
module = import_module(match.group('module'))
File "/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "
File "
File "
File "
File "
File "
File "/home/xiaofeisong/anaconda3/envs/pointnetgpd/lib/python3.7/site-packages/pyface/ui/wx/init.py", line 12, in
import wx
ModuleNotFoundError: No module named 'wx'
答:开始是因为Segmentation fault 问题,参考mayavi segmentation fault on anything! · Issue #450 · enthought/mayavi (github.com)
的解决方案,在.bashrc文件里面加入
export ETS_TOOLKIT=wx
source一下然后运行代码时出现No module named 'wx',直接pip安装失败,所以在Index of /wxPython4/extras/linux/gtk3/ubuntu-18.04
里面下载对应版本的whl文件,直接安装就可以了,参考:
(8条消息) Ubuntu 18.04 wxPython安装报错:ERROR: failed building wxWidgets_peastarrt的博客-CSDN博客
pip install wxPython-4.1.1-cp37-cp37m-linux_x86_64.whl
38、ERROR: Could not find a version that satisfies the requirement ruckig (from versions: none)
ERROR: No matching distribution found for ruckig
下载ruckig
git clone https://github.com/pantor/ruckig
cd ruckig
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
注:后来我发现问题没解决,
ruckig库放在/usr/local/include,可以把ruckig的include文件放在/usr/local/include
39、 Cycles requires WITH_OPENIMAGEIO, the library may not have been found.
Configure OIIO or disable WITH_CYCLES
参考:(20条消息) openEXR和openImageIO安装_windistance的博客-CSDN博客_openimageio
sudo apt-get install libopenimageio-dev
39、ERROR: cannot launch node of type [controller_manager/controller_manager]: controller_manager
sudo apt-get install ros-melodic-controller-manager
40.由solidworks转出URDF后,导入gazebo的模型出现滑动,乱飞的情况。
答:将模型的model.sdf文件里面的mass改的特别小,重新导入后零件不抖动了,具体原因不知道。