求助,pip 升级报错报错

求助,关于安装pip的问题~~_python吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:112,047贴子:
求助,关于安装pip的问题~~收藏
最近想安装pip,发现用官网的办法总是失败,无论是在linux系统还是win8,都会出现下载不动,报错,想问下是什么原因,还有上python官网巨慢,前些天还不是这样的。
“健康随e保(长青版)”老人防癌险,线上免体检。
自顶~~~~~~~~
我也碰到这样的情况,大概是访问国外网速慢的问题。
越…………墙OK
源码安装吧
每对新人结婚成功的那一刻,送礼最多的吧友可以获得本次求婚的“月老”称号和成就,
骚年,你需要学会翻墙
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或Python 概述
Last login: Sat Aug 22 22:16:53 on ttys000admindeMBP:~ admin$ cd desktopadmindeMBP:desktop admin$ cd codeadmindeMBP:code admin$ python 3.4.3 get-pip.pypython: can't open file '3.4.3': [Errno 2] No such file or directoryadmindeMBP:code admin$ python get-pip.pyCollecting pip/var/folders/yc/s9fc8fls6s14r6t__xqvkkqr0000gn/T/tmpITpanG/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see
Using cached pip-7.1.1-py2.py3-none-any.whl
Hash of the package
(from ) (1adf3cab7bceeb74aa46e1) doesn't match the expected hash f7ea119d3769!Bad md5 hash for package
(from )Traceback (most recent call last):
File "get-pip.py", line 17759, in &module&
File "get-pip.py", line 162, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 140, in bootstrap
sys.exit(pip.main(["install", "--upgrade"] + packages + args))
File "/var/folders/yc/s9fc8fls6s14r6t__xqvkkqr0000gn/T/tmpITpanG/pip.zip/pip/__init__.py", line 217, in main
File "/var/folders/yc/s9fc8fls6s14r6t__xqvkkqr0000gn/T/tmpITpanG/pip.zip/pip/basecommand.py", line 248, in main
File "/var/folders/yc/s9fc8fls6s14r6t__xqvkkqr0000gn/T/tmpITpanG/pip.zip/pip/utils/outdated.py", line 102, in pip_version_check
File "/var/folders/yc/s9fc8fls6s14r6t__xqvkkqr0000gn/T/tmpITpanG/pip.zip/pip/_vendor/packaging/version.py", line 41, in parse
File "/var/folders/yc/s9fc8fls6s14r6t__xqvkkqr0000gn/T/tmpITpanG/pip.zip/pip/_vendor/packaging/version.py", line 210, in __init__TypeError: expected string or buffer
你好!非常感谢你收看这节课,感谢支持!看到日志中使用了缓存的pip, (注意到 using cached pip ...)。尝试使用 python get-pip.py --no-cache-dir如果仍然失败,可以考虑使用手动安装的方式来进行。如果在尝试了以上方法依然不行的话,我们再去试试手动安装。如有其他问题请与我联系。谢谢!
@ 如何手动安装,初学不是特别有概念。 我也说一直报错
手动安装可以到pip官方网站下载pip源码包进行安装,
现在安装python的时候默认都会安装pip
你安装python的时候是不是没有勾选pip选项呢?
Python 概述
服务热线:400-678-826612579人阅读
python(47)
用官方的get-pip.py安装 pip失败, 报类似
InsecurePlatformWarning
Could not find a version that satisfies the requirement ** (from versions: )
No matching distribution found for simpejson
的错, 没有找到具体原因.
尝试用 easy_install 安装pip , 报错:
Download error on
: [SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:581) – Some packages may not be
found! Couldn’t find index page for ‘pip’ (maybe misspelled?) Scanning
index of all packages (this may take a while) Reading
Download error on
: [SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:581) – Some packages may not be
found! No local packages or download links found for pip error: Could
not find suitable distribution for Requirement.parse(‘pip’)
不过, 可以看到原因了, 根据
重新安装curl的证书:
$ wget http://curl.haxx.se/ca/cacert.pem
$ mv cacert.pem ca-bundle.crt
$ sudo cp ca-bundle.crt /etc/pki/tls/certs/
然后再执行sudo easy_intall pip 就成功了
后来再另一台机器上用pip 装simplejson同样上述失败,然后更新证书, 再安装simplejson 成功
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:179644次
积分:2400
积分:2400
排名:第12132名
原创:55篇
转载:141篇
(1)(1)(2)(8)(3)(1)(1)(1)(4)(11)(7)(11)(1)(2)(2)(7)(8)(7)(2)(2)(14)(8)(2)(5)(6)(7)(1)(1)(1)(1)(2)(5)(4)(3)(2)(1)(4)(5)(4)(7)(1)(2)(2)(4)(1)(2)(1)(8)(4)(4)(3)(3)   这几天把python版本升级后,发现pip安装模块好多都报错(暂不确定是不是因为升级导致的),我定睛一看,发现是权限的问题,那么怎么解决呢?
1 权限问题
C:\Users\ljf&pip install xlwt
Exception:
Traceback (most recent call last):
File "c:\program files\python35\lib\site-packages\pip\basecommand.py", line 21
1, in main
status = self.run(options, args)
File "c:\program files\python35\lib\site-packages\pip\commands\install.py", li
ne 311, in run
root=options.root_path,
File "c:\program files\python35\lib\site-packages\pip\req\req_set.py", line 64
6, in install
File "c:\program files\python35\lib\site-packages\pip\req\req_install.py", lin
e 803, in install
self.move_wheel_files(self.source_dir, root=root)
File "c:\program files\python35\lib\site-packages\pip\req\req_install.py", lin
e 998, in move_wheel_files
isolated=self.isolated,
File "c:\program files\python35\lib\site-packages\pip\wheel.py", line 339, in
move_wheel_files
clobber(source, lib_dir, True)
File "c:\program files\python35\lib\site-packages\pip\wheel.py", line 310, in
ensure_dir(destdir)
File "c:\program files\python35\lib\site-packages\pip\utils\__init__.py", line
71, in ensure_dir
os.makedirs(path)
File "c:\program files\python35\lib\os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [WinError 5] 拒绝访问。: 'c:\\program files\\python35\\Lib\\sit
e-packages\\xlwt'
  注意看我标红的那部分,提示说权限错误,拒绝访问,我们这样解决:
& & & 1 首先切换到c:\\program files\\目录下,
  2 我们鼠标右击python35这个目录,点击 属性 ,
  3 首先切换到 &安全 这个大标题下面,选中当前登陆的用户,然后再点击编辑,编辑完以后不要忘记点击应用,
  4 点击添加的权限,我这里为了方便全部一块选了,反正根据自己的实际情况而定,最后点击应用,再点击确定就大功告成。
  5 我们此时再看看自己pip,是不是能够安装模块了。
阅读(...) 评论()博客访问: 1992167
博文数量: 276
博客积分: 9440
博客等级: 少将
技术积分: 6921
注册时间:
认证徽章:
-- linux爱好者,业余时间热衷于分析linux内核源码
-- 目前主要研究云计算和虚拟化相关的技术,主要包括libvirt/qemu,openstack,opennebula架构和源码分析。
-- 第五届云计算大会演讲嘉宾
微博:@Marshal-Liu
APP发帖 享双倍积分
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: 云计算
& 1. 问题描述 
  devstack最近有两次提交改变了pip的下载地址,所以导致pip安装失败,报如下错误:pkg_resources.DistributionNotFound: pip==1.4.1,可以通过git log来查看最近的与pip相关的两次commit.
commit e41cd06e16b6f382edf2e45aff434be7f8f85270
Author: Sean Dague
Date:&& Thu Jun 5 07:04:41
&&& make get-pip.py download failures more clear
&&& curl dying ends up being a really unclear failure condition, and
&&& hard to fingerprint in the gate. We should make this much more
&&& explicit when we die.
&&& Also, don't trust the upstream filename, because all the rest of
&&& our logic would break if it changes anyway.
&&& Change-Id: Ibc2a96baf0d7af896fbf
commit dea4e0ed583a730dfa4c
Author: Sean Dague
Date:&& Wed Jun 4 16:25:52
&&& be opinionated: only use get-pip.py
&&& get-pip.py is now on a CDN, and is the prefered way to get pip.
&&& Remove the default path of using pip tarballs from pypi and use
&&& get-pip.py on from here on.
&&& Closes-Bug: #1326539
&&& Change-Id: I3ba6b3e1d00b30ebfd060
&&& (cherry picked from commit 7b63c5ec9e9aea1a754efc9f9983)
commit d4fe50feb1af6becb5ff84c8d4f456
Author: Dean Troyer
Date:&& Fri May 16 10:58:15
&&& Add CirrOS 0.3.2 to image list
2. 解决方法
方法一: 可以将devstack的代码reset到d4fe50feb1af6becb5ff84c8d4f456这次commit,具体方法为:
git reset --hard d4fe50febaf6becb5ff84c8d4f456
方法二: 手动安装pip-1.4.1,执行如下命令并修改install_pip.sh文件,注释自动卸载pip的函数
sudo easy_install pip==1.4.1
vim files/install_pip.sh
##文件的59行和61行注释
&58 # Eradicate any and all system packages
&59 #uninstall_package python-pip
&61 #install_get_pip
解决方法三:
  如果之前安装过pip, 重新执行时如果报这个错误,可以先删除之前安装过的pip,在重新执行stack.sh
&&&&&&& sudo rm /usr/local/bin/pip
&&&&&&& sudo rm /usr/local/lib/python2.7/dist-packages/pip* -rf
---------------------------------------------------
微博:@Marshal-Liu
& & & & &欢迎交流!&
---------------------------------------------------
阅读(22362) | 评论(1) | 转发(0) |
相关热门文章
给主人留下些什么吧!~~
我用第三种方法解决了问题!
请登录后评论。}

我要回帖

更多关于 pip list 报错 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信