系统中同时存在python2和python3时 pip有时候更新后会报错 解决安装的方法如下
官网原链接:https://pip.pypa.io/en/stable/installing/
Installation
Do I need to install pip?
pip is already installed if you are using Python 2 >=2.7.9 or Python 3 >=3.4 downloaded from python.org or if you are working in a Virtual Environment created by virtualenv or pyvenv. Just make sure to upgrade pip.
Installing with get-pip.py
To install pip, securely download get-pip.py. [1]:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Inspect get-pip.py
for any malevolence. Then run the following:
到这一步的时候,如果python2的pip坏了,就运行:python2 get-pip.py
如果是python3的pip坏了,升级就运行:python3 get-pip.py
python get-pip.py
Warning
Be cautious if you are using a Python install that is managed by your operating system or another package manager. get-pip.py
does not coordinate with those tools, and may leave your system in an inconsistent state.
get-pip.py
also installs setuptools [2] and wheel if they are not already. setuptools is required to install source distributions. Both are required in order to build a Wheel Cache (which improves installation speed), although neither are required to install pre-built wheels.
Note
The get-pip.py script is supported on the same python version as pip. For the now unsupported Python 2.6, alternate script is available here.
get-pip.py options
--no-setuptools
-
If set, do not attempt to install setuptools
--no-wheel
-
If set, do not attempt to install wheel
get-pip.py
allows pip install options and the general options. Below are some examples:
Install from local copies of pip and setuptools:
python get-pip.py --no-index --find-links=/local/copies
Install to the user site [3]:
python get-pip.py --user
Install behind a proxy:
python get-pip.py --proxy="http://[user:passwd@]proxy.server:port"
Using Linux Package Managers
See Installing pip/setuptools/wheel with Linux Package Managers in the Python Packaging User Guide.
Python and OS Compatibility
pip works with CPython versions 2.7, 3.3, 3.4, 3.5, 3.6 and also pypy.
This means pip works on the latest patch version of each of these minor versions. Previous patch versions are supported on a best effort approach.
pip works on Unix/Linux, macOS, and Windows.
[1] | "Secure" in this context means using a modern browser or a tool like curl that verifies SSL certificates when downloading from https URLs. |
[2] | Beginning with pip v1.5.1, get-pip.py stopped requiring setuptools to be installed first. |
[3] | The pip developers are considering making --user the default for all installs, including get-pip.py installs of pip, but at this time, --user installs for pip itself, should not be considered to be fully tested or endorsed. For discussion, see Issue 1668. |
系统中同时存在python2和python3时 pip有时候更新后会报错 解决安装的方法如下的更多相关文章
- Eclipse中导入项目后js报错解决方法(转未解决问题)
本文转自:http://blog.csdn.net/chenchunlin526/article/details/54666882 Eclipse中导入项目后js报错的原因与解决方法 在我们将项目导入 ...
- 本地同时安装python2和python3时pip报错
引言: 安装完成后,想测试一下两个版本的pip是否都可以正常工作,结果python3的能正常工作,但是pip2 --version就会报错,报错信息如下: Traceback (most recent ...
- 【解决】MacOS下 Python3.7 使用 pyinstaller 打包后执行报错 Failed to execute script pyi_rth__tkinter
Fix tcl/tk libs inclusion in tkinter with Python3.7 under MacOS 使用 Pyinstaller 打包时候报错 3027 ERROR: Tc ...
- VSFTP 连接时425 Security: Bad IP connecting.报错-----解决方法
当登录FTP时候出现这个报错时.是因为PASV模式的安全检查是开启的(默认是开启的) ftp> ls227 Entering Passive Mode (172,16,101,33,35,58 ...
- 系统中同时有 python2和 python3,怎么让 ipython 选择不同的版本启动?
已经安装的情况下: > which ipython /usr/local/bin/ipython > cat /usr/local/bin/ipython #!/usr/local/op ...
- Eclipse中导入项目后js报错解决方法
http://blog.csdn.net/chenchunlin526/article/details/54666882 原因是因为开启了js的校验功能 不影响项目 如需去除错误标志按链接文档操作即可 ...
- Windows下同时安装了Python2与Python3时如何使用RobotFrameWork
由于windows下不能像linux那样指定python文件的运行路径,当电脑中即安装了python2,又安装了python3时,也不能在环境变量中都配置运行路径吧(当然是可以配置的,系统会按照靠前的 ...
- eclipse java项目中明明引入了jar包 为什么项目启动的时候不能找到jar包 项目中已经 引入了 com.branchitech.app 包 ,但时tomcat启动的时候还是报错? java.lang.ClassNotFoundException: com.branchitech.app.startup.AppStartupContextListener java.lang.ClassN
eclipse java项目中明明引入了jar包 为什么项目启动的时候不能找到jar包 项目中已经 引入了 com.branchitech.app 包 ,但时tomcat启动的时候还是报错?java. ...
- win7/8系统中php5.3和5.4、5.5不能加载php_curl.dll解决办法
win7/8系统中php5.3和5.4.5.5不能加载php_curl.dll解决办法 作者:用户 来源:互联网 时间:2016-06-23 18:54:33 php变量注释系统模块 摘要: 本文 ...
随机推荐
- 【读后感】Netty 系列之 Netty 高性能之道 - 相比 Mina 怎样 ?
[读后感]Netty 系列之 Netty 高性能之道 - 相比 Mina 怎样 ? 太阳火神的漂亮人生 (http://blog.csdn.net/opengl_es) 本文遵循"署名-非商 ...
- Unity自己主动打包工具
最開始有写打包工具的想法,是由于看到<啪啪三国>王伟峰分享的一张图,他们有一个专门的"工具程序猿"开发各种工具. (ps:说起来这个王伟峰和他的创始团队成员,曾经跟我是 ...
- ermissions on /usr/local/mongodb/conf/keyFile are too open
ermissions on /usr/local/mongodb/conf/keyFile are too open > rs.initiate(cfg); { "ok" : ...
- MRP 中的数据元素
20170227 MRP 元素是个什么东西? 系统显示的是MRP 元素缩写,程序用的是Code SimReq 简单需求AR 相关预订 OrdRes 订单需求BA 采购申请 PurRqs 采购申请BB ...
- Servlet session的理解
servlet参见http://blog.csdn.net/bryanliu1982/article/details/5214899 session参见http://lavasoft.blog.51c ...
- Hihocoder 之 #1097 : 最小生成树一·Prim算法 (用vector二维 模拟邻接表,进行prim()生成树算法, *【模板】)
#1097 : 最小生成树一·Prim算法 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 最近,小Hi很喜欢玩的一款游戏模拟城市开放出了新Mod,在这个Mod中,玩家可 ...
- Why is an 'Any CPU' application running as x86 on a x64 machine?
It's likely that you linked some assemblies that are not Any CPU, but include native code (or are ...
- [推荐]Silverlight 2 开发者海报
从Brad Abrams的Blog上看到了一张Silverlight 2开发者海报,非常酷,拿出来与大家分享. [JPG版本 5.8MB] [PNG版本 6.5MB] [TIF版本 19.9 MB] ...
- 一步一步学Silverlight 2系列(15):数据与通信之ASMX
概述 Silverlight 2 Beta 1版本发布了,无论从Runtime还是Tools都给我们带来了很多的惊喜,如支持框架语言Visual Basic, Visual C#, IronRuby, ...
- https证书/即SSL数字证书申请途径和流程
国际CA机构GlobalSign中国 数字证书颁发中心网站:http://cn.globalsign.com https证书即SSL数字证书,是广泛用 于网站通讯加密传输的解决方案,是提供通信保 ...