1、Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/lxml/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748) - skipping
可以考虑换源
如果在使用docker中遇到这个错误,可能是创建容器时没有–net=host
pip install pyqt5-tools -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
2、PackagesNotFoundError: The following packages are not available from current channels:
conda config --set remote_read_timeout_secs 10000.0
执行上面这行命令,再重新安装
3、OSError: [Errno 18] Invalid cross-device link and OSError: [Errno 22] Invalid argument: #6943
更新conda版本,不要在已经进入的虚拟环境中更新,在base环境下更新
conda config --add channels conda-canary
conda update conda
4、ERROR: No matching distribution found for cv2
pip install opencv-python
5、ImportError: libGL.so.1: cannot open shared object file: No such file or directory
原因:缺少共享库
sudo apt update
sudo apt install libgl1-mesa-glx
可能容器内没有sudo指令吗,也可以使用如下等价命令:
apt-get update
apt-get install sudo
6、连接不上网络,一般切换conda源可以解决
中科大源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --set show_channel_urls yes
更新源后还可能获取不到安装包,这时候恢复原来的源有可能又可以获取到了:
conda config --remove-key channels