解决 ‘Could not fetch URL https://pypi.python.org’的问题
【前提】:
win10下python3和python2共存环境,但是环境变量只配置了python3
【问题】:
用pip安装一个包
执行pip2 install xxx的时候报错
Fatal error in launcher: Unable to create process using '"'
执行pip3 install xxx的时候报同样的错误
Fatal error in launcher: Unable to create process using '"'

【解决】:
python2 -m pip install XXX
python3 -m pip install XXX

报了新的错误 :
Could not fetch URL https://pypi.org/simple/xlsxwriter/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/xlsxwriter/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)'))) - skipping
研究了好久只知道是证书的错误~按照网上的各种指导尝试了如下方案
1.第一种尝试方式:直接下载get-pip.py文件,执行命令python get-pip.py 结果是:失败
2.第二种尝试方式:加上--trusted-host 执行 pip --trusted-host pypi.python.org install xxx 结果是:失败
3.第三种尝试:发现是url的来源的问题,换成了国内的pip源就可以正常安装了,我使用的是:pip install xlrd -i http://pypi.douban.com/simple --trusted-host pypi.douban.com,结果:失败
1)http://mirrors.aliyun.com/pypi/simple/ 阿里云
2)https://pypi.mirrors.ustc.edu.cn/simple/ 中国科技大学
3) http://pypi.douban.com/simple/ 豆瓣
4) https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学
5) http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学
4.第四种尝试:思考了一下混合了两个问题的解决方法,使用命令python -m pip install xlsxwriter --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org ,结果:成功

解决 ‘Could not fetch URL https://pypi.python.org’的问题的更多相关文章
- 日常问题--解决 ‘Could not fetch URL https://pypi.python.org’的问题
难题描述: 解决方法: 使用命令python -m pip install Scrapy --trusted-host=pypi.python.org --trusted-host=pypi.org ...
- windows环境pip安装时一直报错Could not fetch URL https://pypi.org/simple/xrld/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url:
最近项目不忙了~~有开始专研的python大业,上来想用pip安装一个第三方的库,就一直报错: Could not fetch URL https://pypi.org/simple/xrld/: T ...
- pip install xxx Could not fetch URL https://pypi.org/simple/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirmingthe ssl certificate: ...
- Cannot fetch index base URL https://pypi.python.org/pypi/ 解决方法
vi /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # ...
- Cannot fetch index base URL https://pypi.python.org/simple/
这个就是相源的问题,正常安装你的根目录下会有这个pip.log文件,如下 root@liu:~# ll .pip/ total 16 drwxr-xr-x 2 root root 4096 Sep 1 ...
- 虚拟环境中pip install requirments.txt: Cannot fetch index base URL https://pypi.python.org/simple/
Stackoverflow : http://stackoverflow.com/questions/15501133/python-pip-error-cannot-fetch-index-bas ...
- Could not fetch URL https://pypi.org/simple/pip/: There was a problem confir
这个问题其实是无意中解决的:因为在网上找不到解决办法,是我在yum -y installl wget后,自动就好了,安装wget的时候,可能更新了openssl的缘故吧.
- 使用python+xpath 获取https://pypi.python.org/pypi/lxml/2.3/的下载链接
使用python+xpath 获取https://pypi.python.org/pypi/lxml/2.3/的下载链接: 使用requests获取html后,分析html中的标签发现所需要的链接在& ...
- 使用国内镜像通过pip安装python的一些包 Cannot fetch index base URL http://pypi.python.org/simple/
原文地址:http://www.xuebuyuan.com/1157602.html 学习flask,安装virtualenv环境,这些带都ok,但是一安装包总是出错无法安装, 比如这样超时的问题: ...
随机推荐
- Python正则表达式 re.sub()函数:标志位flags与参数个数问题
这两天在写爬虫程序,涉及英文文本处理,需要规范化英文标点符号的写法.正常情况下,英文句号「.」后面需要保证有且只有一个空格,但也有例外情况,比如「i.e.」.「e.g.」.「P.S.」这种.由于无法预 ...
- BeautifulSoup使用手册(查询篇)
目录 开始使用呢 解析器 四种对象 tag对象 标签名(name) 属性值(Attributes) 多值属性 内容 Comment对象 prettify()方法 find_all方法 contents ...
- #ifdef _DEBUG/ #define new DEBUG_NEW/ #endif的作用
转载:https://blog.csdn.net/minghui_/article/details/80748142 转自:#ifdef _DEBUG #define new DEBUG_NEW #e ...
- P5911 [POI2004]PRZ (状态压缩dp+枚举子集)
题目背景 一只队伍在爬山时碰到了雪崩,他们在逃跑时遇到了一座桥,他们要尽快的过桥. 题目描述 桥已经很旧了, 所以它不能承受太重的东西.任何时候队伍在桥上的人都不能超过一定的限制. 所以这只队伍过桥时 ...
- P4231 三步必杀
题目描述 问题摘要: N个柱子排成一排,一开始每个柱子损伤度为0. 接下来勇仪会进行M次攻击,每次攻击可以用4个参数l,r,s,e来描述: 表示这次攻击作用范围为第l个到第r个之间所有的柱子(包含l, ...
- Java之ConcurrentHashMap源码解析
ConcurrentHashMap源码解析 目录 ConcurrentHashMap源码解析 jdk8之前的实现原理 jdk8的实现原理 变量解释 初始化 初始化table put操作 hash算法 ...
- 0xctf[No parameters readfile](魔改版[GXYCTF2019]禁止套娃)
阅读本文前建议先阅读本站中的另一篇文章:[GXYCTF2019]禁止套娃 重要参考链接:http://www.heetian.com/info/827 Leon师傅魔改了[GXYCTF2019]禁止套 ...
- gitlab-配置邮件
一:配置邮件 1. 进入配置文件,通过修改/etc/gitlab/gitlab.rb来设置邮件功能 修改后的文件 1 ## GitLab URL 2 ##! URL on which GitLab ...
- postgreSQL与Kingbase 字符串裁剪区别
--postgreSQL postgres=# select substring('abcdefg',0,4); substring abc (1 行记录) postgres=# select sub ...
- 将本地代码初始化上传到gitlab仓库
首先你已经安装了git. 1.在本地代码目录,鼠标右键Git Bash Here: 2.执行git命令,此命令会在当前目录下创建一个.git文件夹, git init 3.将项目的所有文件添加到仓库中 ...