Could not fetch URL https://pypi.org/simple/virtualenv/: There was a problem confirming the ssl cert

  • Post author:
  • Post category:其他


Could not fetch URL https://pypi.org/simple/virtualenv/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=’pypi.org’, port=443):

当使用pip install 安装三方库的时候总是报错,在网上查了很多都不行,最后找到如下方式解决了:

更换换了一个镜像就好了,具体操作步骤如下:

进入用户家目录:cd ~

创建目录:mkdir .pip

进入目录:cd .pip

创建文件:vim pip.conf

将以下内容放入文件pip.conf中

[global]

timeout = 6000

index-url = http://pypi.douban.com/simple/

[install]

use-mirrors = true

mirrors = http://pypi.douban.com/simple/

trusted-host = pypi.douban.com


sudo python -m pip install –upgrade pip    (更新)

sudo pip –trusted-host pypi.python.org  install  三方库



版权声明:本文为chenjiang2936原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。