栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

conda命令下载包报错总结

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

conda命令下载包报错总结

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
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/954571.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号