做python开发,要用到第三方包,关于MAC下面如何安装Pip ,可以参考前面的 Mac OS 10.9 下python安装easy_install pip 现在我们看看在Windows下面的操作,打开 Pip的官方安装指南https://pip.pypa.io/en/latest/installing.html
Installation
Python & OS Support
pip works with CPython versions 2.6, 2.7, 3.1, 3.2, 3.3, 3.4 and also pypy.
pip works on Unix/Linux, OS X, and Windows.
Note
Python 2.5 was supported through v1.3.1, and Python 2.4 was supported through v1.1.
Install pip
To install or upgrade pip, securely download get-pip.py.(如果官网下载不下来,可以点这个链接在本网站下载)
Then run the following (which may require administrator access):
1 |
python get-pip.py |
If setuptools (or distribute) is not already installed, get-pip.py will install setuptools for you. [2]
To upgrade an existing setuptools (or distribute), run pip install -U setuptools. [3]
To enable the use of pip from the command line, ensure the Scripts subdirectory of your Python installation is available on the system PATH. (This is not done automatically.)
Additionally, get-pip.py supports using the pip install options and the general options. Below are some examples:
Install from local copies of pip and setuptools:
1 |
python get-pip.py --no-index --find-links=/local/copies |
Install to the user site [4]:
1 |
python get-pip.py --user |
Install behind a proxy:
1 |
python get-pip.py --proxy="[user:passwd@]proxy.server:port" |
Using Package Managers
On Linux, pip will generally be available for the system install of python using the system package manager, although often the latest version will be unavailable.
On Debian and Ubuntu:
1 |
sudo apt-get install python-pip |
On Fedora:
1 |
sudo yum install python-pip |