关于使用pip时,遇到的问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34355232/article/details/83013953

问题描述:
当我使用pip install +需要的安装包时,其会报如下错误:

 InsecurePlatformWarning
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '_ssl.c:507: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping

解决方法:

pip install --index https://pypi.mirrors.ustc.edu.cn/simple numpy

找到了一些国内镜像如下:
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
douban http://pypi.douban.com/simple
Python官方 https://pypi.python.org/simple
v2ex http://pypi.v2ex.com/simple
中国科学院 http://pypi.mirrors.opencas.cn/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

参考:https://stackoverflow.com/questions/50836535/pip-does-not-work-ttpsconnectionpoolhost-pypi-org-port-443-max-retries-ex

猜你喜欢

转载自blog.csdn.net/qq_34355232/article/details/83013953