这里重新安装一下opencv Install opencv-python-headless instead of opencv-python. Server (headless) environments do not have GUI packages installed which is why you are seeing the error. opencv-python depends on Qt which in turn depends on X11 related libraries.
Other alternative is to run sudo apt-get install -y libgl1-mesa-dev which will provide the missing libGL.so.1 if you want to use opencv-python. The libgl1-mesa-dev package might be named differently depending on your GNU/Linux distribution. 总结:在docker中没有GUI页面,所以使用opencv会报错,因此需要安装opencv-python-headless,或者安装缺少的libgl1
2.4 从源码安装mmdet3d
1 2 3 4
git clone https://github.com/open-mmlab/mmdetection3d.git cd mmdetection3d git checkout v0.17.1 # Other versions may not be compatible. python setup.py install
安装完成后,报错信息如下:
1 2
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. yapf 0.40.2 requires importlib-metadata>=6.6.0, but you have importlib-metadata 4.2.0 which is incompatible.
报错1 ImportError: libGL.so.1: cannot open shared object file: No such file or directory 修改:安装libsm6 libxext6 libgl1-mesa-glx apt-get install libsm6 libxext6 libgl1-mesa-glx 报错2 ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory 修改:安装libglib2.0-dev apt-get install libglib2.0-dev
报错3 ModuleNotFoundError: No module named 'tools' 修改:添加python环境变量 export PYTHONPATH="./"
报错4 from data_converter import indoor_converter as indoor File "/home/lin/Documents/BEVFormer/tools/data_converter/indoor_converter.py", line 6, in <module> from tools.data_converter.s3dis_data_utils import S3DISData, S3DISSegData ModuleNotFoundError: No module named 'tools.data_converter'
Technology enthusiast, want to learn anything fun; open source enthusiast, firmly believe that open source needs documentation adaptation, and an open source project without good documentation is not a good open source project; current main business \:end-to-end autonomous driving