使用阿里云服务器时遇到的一些问题
1.问题描述:
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.tuna.tsingh
ua.edu.cn’, port=443): Max retries exceeded with url: /simple/numpy/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate
verify failed: self signed certificate in certificate chain (_ssl.c:1056)’))) - skipping
问题解决:
增加–trusted-host pypi.douban.com 表示将指定网站设置为信任服务器
正确命令:
pip install <库名> --index-url http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
2.问题描述
在linux的终端下pip install opencv时遇到错误:
ERROR: Could not find a version that satisfies the requirement opencv (from versions: none)
ERROR: No matching distribution found for opencv
问题解决:
安装镜像源
正确命令
pip install https://pypi.tuna.tsinghua.edu.cn/simple
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn opencv-python
若遇到权限问题,将上行修改为:
pip install --user -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn opencv-python
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)