系统中同时存在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变量注释系统模块 摘要: 本文 ...
随机推荐
- 【转】idea激活搭建授权服务器
1.下载软件:磁力链接: magnet:?xt=urn:btih:2289E4F8CEB346AC44E54C8C0DA706CC537301AA 复制磁力链接地址 magnet:?xt=urn:bt ...
- (linux)container_of()宏
在学习Linux驱动的过程中,遇到一个宏叫做container_of. 该宏定义在include/linux/kernel.h中,首先来贴出它的代码: /** * container_of - ...
- vue 数组和对象渲染问题
vue 数组和对象渲染问题 最近项目有点忙碌,遇到好多问题都没有总结(╥﹏╥),在开发过程中,取vuex中的数组渲染完成之后,再次修改数组的值,数据更新了,但是视图并没有更新.以为是数组更新的问题,后 ...
- POJ3376 Finding Palindromes —— 扩展KMP + Trie树
题目链接:https://vjudge.net/problem/POJ-3376 Finding Palindromes Time Limit: 10000MS Memory Limit: 262 ...
- Android Studio 3.0.1模拟器启动报错Emulator: glClear:466 GL err 0x502
启动模拟器时,报了一大堆以上错误 启动起来之后, Emulator的画面没有正常显示, 点击鼠标会闪烁, 有时还会上下颠倒 有可能是驱动版本太低不支持一些特性,因此就下载个驱动精灵.升级了显卡驱动,结 ...
- Oracle:ORA-00214
现场数据库服务器突然断电,启动时,提示如下现象: sql>sqlplus / as sysdba sql>startup ORA-00214: controlfile 'E:\oracle ...
- Getting Started with the Intel Media SDK
By Gael Hofemeier on March 19, 2015 Follow Gael on Twitter: @GaelHof Media SDK Developer’s Guide Med ...
- [Selenium] 搭建 Android WebDriver 环境
1.安装 Android SDK 到如下网址下载 Android SDK http://developer.android.com/sdk/index.html 2.创建 Android 虚拟设备 解 ...
- jmeter+jenkins+ant部署持续集成测试
原文地址:http://blog.csdn.net/kaluman/article/details/74535495 开头的注意事项: 1.所有的环境变量和代码,都需要使用英文的符号,变量之间都需要英 ...
- Centos7 编译安装 Nginx、MariaDB、PHP
前言 本文主要大致介绍CentOS 7下编译安装Nginx.MariaDB.PHP.面向有Linux基础且爱好钻研的朋友.技艺不精,疏漏再所难免,还望指正. 环境简介: 系统: CentOS 7,最小 ...