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"

Upgrading pip

On Linux or macOS:

pip install -U pip

On Windows [4]:

python -m pip install -U pip

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命令报错的解决办法的更多相关文章

  1. Windows 10 上安装 3D Studio Max 2016 报错的解决办法

    在 Windows 10 上安装 3D Stuido Max 2016 报错,无法正常安装,查看日志是 VC 运行时安装错误,经过分析发现在 Windows 10 上已经有这些运行时并且版本比安装包中 ...

  2. Xamarin开发安装Visual Studio 2015 update2报错的解决办法

    Xamarin开发安装Visual Studio 2015 update2报错的解决办法错误信息:update 2 requires a member of the visual studio 201 ...

  3. ionic中generate page后module.ts报错的解决办法

    此问题出现在Ionic官方将版本从2.2升级到Ionic3以上之后, 在项目中generate page时,自动创建的module.ts就报错,如下: 解决办法如下: 1)将IonicModule替换 ...

  4. python2,python3同时安装时,python3可以安装并升级pip库,python2报错的解决办法

    最近在使用pip安装包的的时候出现下面错误 UnicodeEncodeError: 'ascii' codec can't encode character u'\u258f' 查询资料后发现原因是p ...

  5. RabbitMq安装成功后执行命令报错(Error: unable to connect to node 'rabbit@DESKTOP-LPKSION': nodedown)

    我们直接来看解决方案吧.首先打开服务,找到RabbitMq服务. 双击打开后选择登陆选项卡: 点选此账户,输入你计算机的登录名称.点击浏览: 在这里输入你的用户名,点检索: 这里的密码输入你电脑开机登 ...

  6. 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 解决方案: ...

  7. 一台Ubuntu server上安装多实例MySQL

    受环境所迫,在一台Ubuntu server上安装多个实例MySQL. 手动安装MySQL 环境:Ubuntu server 11.10 64bit + mysql-5.5.17-linux2.6-x ...

  8. 在CentOS上安装node.js的时候报错:No acceptable C compiler found!解决办法

    在CentOS上安装node.js的时候报错:No acceptable C compiler found! 原因:没有c编译器. 解决办法:安装GCC 命令如下: #yum install gcc ...

  9. VMware虚拟机中的CentOS7安装Nginx后本机无法访问的解决办法

    VMware虚拟机中的CentOS7安装Nginx后本机无法访问的解决办法 在linux上安装nginx 请参考:Linux Centos7 安装 nginx 在虚拟机centos7上安装nginx之 ...

随机推荐

  1. SQL 通用数据类型

    SQL 通用数据类型 数据类型定义列中存放的值的种类. SQL 通用数据类型 数据库表中的每个列都要求有名称和数据类型.Each column in a database table is requi ...

  2. js 计算两个日期之间 相差几年几月几日

    1.计算日期差 Mine.vue <!-- 我的 --> <template> <div> <!-- 标题栏 --> <x-header :lef ...

  3. Web开发从零单排之一:在新浪云平台SAE上开发一个html5电子喜帖

    需求描述: 本人大婚将至,女朋友说“现在都流行在微信上发电子请帖了,你不是技(cheng)术(xu)宅(yuan)嘛,不会连这个都搞不定吧” 本人嘴上说这等小事何足挂齿,但心里还是七上八下的,虽然自认 ...

  4. oracle获取字符串长度函数length()和lengthb()

    oracle获取字符串长度函数length()和lengthb()   lengthb(string)计算string所占的字节长度:返回字符串的长度,单位是字节 length(string)计算st ...

  5. Linux Grub系统加密、破密、修复

    一.在重新启动系统时候按任意键进入 grub界面  Grub加密 一.title前的密码 修改grub.conf 这种加密只是在用户要进入grub界面的时候提示要输入密码,但是可以正常进入系统,有没有 ...

  6. Swift基础一(代码)

    import Foundation println("Hello, World!") var string1 = "Hello BeiJing" //定义一个变 ...

  7. 树莓派的PWM脉宽调制功能介绍

    近期想用树莓派控制航模的电调,于是研究了下PWM.貌似控制电调比較麻烦,由于电调须要发送几个特定的信号启动,然后才干进入控制模式.今天先弄明确PWM,慢慢折腾.以下的程序亲測可用,我用的树莓派mode ...

  8. test_action

    [TOP] 为什么百度校招数据挖掘工程师的笔试题目是跟数据挖掘关系不大? - 研究生生活交流 - 王道论坛,专注于计算机考研的点点滴滴! http://www.cskaoyan.com/thread- ...

  9. spring 简述

    Spring的发展 1.1. Spring1.x 时代 在Spring1.x时代,都是通过xml文件配置bean,随着项目的不断扩大,需要将xml配置分放到不同的配置文件中,需要频繁的在java类和x ...

  10. YTU 2580: 改错题----修改revert函数

    2580: 改错题----修改revert函数 时间限制: 1 Sec  内存限制: 128 MB 提交: 194  解决: 82 题目描述 修改revert函数,实现输入N个数,顺序倒置后输出 #i ...