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:
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. |
Ubuntu Server 上安装pip后pip命令报错的解决办法的更多相关文章
-
Windows 10 上安装 3D Studio Max 2016 报错的解决办法
在 Windows 10 上安装 3D Stuido Max 2016 报错,无法正常安装,查看日志是 VC 运行时安装错误,经过分析发现在 Windows 10 上已经有这些运行时并且版本比安装包中 ...
-
Xamarin开发安装Visual Studio 2015 update2报错的解决办法
Xamarin开发安装Visual Studio 2015 update2报错的解决办法错误信息:update 2 requires a member of the visual studio 201 ...
-
ionic中generate page后module.ts报错的解决办法
此问题出现在Ionic官方将版本从2.2升级到Ionic3以上之后, 在项目中generate page时,自动创建的module.ts就报错,如下: 解决办法如下: 1)将IonicModule替换 ...
-
python2,python3同时安装时,python3可以安装并升级pip库,python2报错的解决办法
最近在使用pip安装包的的时候出现下面错误 UnicodeEncodeError: 'ascii' codec can't encode character u'\u258f' 查询资料后发现原因是p ...
-
RabbitMq安装成功后执行命令报错(Error: unable to connect to node 'rabbit@DESKTOP-LPKSION': nodedown)
我们直接来看解决方案吧.首先打开服务,找到RabbitMq服务. 双击打开后选择登陆选项卡: 点选此账户,输入你计算机的登录名称.点击浏览: 在这里输入你的用户名,点检索: 这里的密码输入你电脑开机登 ...
-
SSH登录之后运行命令报错的解决办法-- Failed to connect to Mir: Failed to connect to server socket: No such file or directory
问题描述: Failed to connect to Mir: Failed to connect to server socket: No such file or directory 解决方案: ...
-
一台Ubuntu server上安装多实例MySQL
受环境所迫,在一台Ubuntu server上安装多个实例MySQL. 手动安装MySQL 环境:Ubuntu server 11.10 64bit + mysql-5.5.17-linux2.6-x ...
-
在CentOS上安装node.js的时候报错:No acceptable C compiler found!解决办法
在CentOS上安装node.js的时候报错:No acceptable C compiler found! 原因:没有c编译器. 解决办法:安装GCC 命令如下: #yum install gcc ...
-
VMware虚拟机中的CentOS7安装Nginx后本机无法访问的解决办法
VMware虚拟机中的CentOS7安装Nginx后本机无法访问的解决办法 在linux上安装nginx 请参考:Linux Centos7 安装 nginx 在虚拟机centos7上安装nginx之 ...
随机推荐
-
FastMM配置文件详解
FastMM最新版本提供了中文语言包,可方便国内使用.下载地址为 http://sourceforge.net/projects/fastmm/ 配置文件为:FastMM4Options.inc, 中 ...
-
CMS介绍
CMS介绍 CMS是Content Management System的缩写,意为“内容管理系统”,它具有许多基于模板的优秀设计,可以加快网站开发的速度和减少开发的成本. CMS的功能不仅限于处理文本 ...
-
Perl 中 Pod 的基本用法。
1. Pod 语法 pod中用段分可以分为三种,普通段落,字面段落(Verbatim Paragraph)和命令段落.三者的区分非常简单,以=pod|head1|cut|over等指示字开始的段落为命 ...
-
wp8.1 C#技巧: 计时器
public MainPage() { this.InitializeComponent(); this.timer = new DispatcherTimer();//新建委托时间实例 timer. ...
-
第五篇 Getting Started with ORACLE EBS(开始学习ORACLE EBS)
第一篇介绍了ERP软件是供应链管理软件.告诉你这个软件改善或提升企业管理的切入点和着力点.有了着力点才能给力. 第二篇介绍了什么是咨询以及咨询工作共通的章法,告诉了你咨询的套路是什么,就像练习一套拳, ...
-
java jvm学习笔记三(class文件检验器)
欢迎装载请说明出处:http://blog.csdn.net/yfqnihao 前面的学习我们知道了class文件被类装载器所装载,但是在装载class文件之前或之后,class文件实际上还需要被校验 ...
-
Android EditText的使用及值得注意的地方
Android上有很多输入法应用,每种输入法都有各自的特点,输入法多数时候是和EditText配合使用,结合我自己的亲身实践分享一下使用EditText过程中遇到的一些问题及解决方法. 设置默认输入法 ...
-
office文档转pdf
这里贴下代码吧,没啥好说的. using System; using System.Collections.Generic; using System.Linq; using System.Text; ...
-
Socket实现-Socket I/O
Socket层的核心是两个函数:sosend()和soreceive().这两个函数负责处理所有Socket层和协议层之间的I/O操作. select()系统调用的作用是监控文件描述符的状态.一般用于 ...
-
rt-thread之串口设备的配置流程
@2019-01-30 [小记] > rt-thread 工程启动之后先是进入函数 rtthread_startup 做一些系统运行前的基础工作,主要有: * 板级硬件初始化 * 系统定时器初始 ...