Python: Install pip on Windows

References

[1] http://www.pip-installer.org/en/latest/

[2] http://pypi.python.org/pypi/pip#downloads

[3] http://pypi.python.org/pypi/setuptools#downloads

[4] http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows


Python allows developers to install packages. pip is a tool for installing and managing Python packages. To install pip, you can follow the steps below:

Install setuptools

  1. Download setuptools [http://pypi.python.org/pypi/setuptools#downloads]
  2. Open the installer to install setuptools

Install pip

  1. Download pip-1.2.x.tar.gz (e.g. pip-1.2.1.tar.gz)[http://pypi.python.org/pypi/pip#downloads]
  2. Upzip the pip-1.2.x.tar.gz to a folder, e.g. C:\Downloads\pip-1.2.x
  3. Assume the folder is at C:\Downloads\pip-1.2.x
    cd "C:\Downloads\pip-1.2.x"
  4. Install pip
    C:\Python27\python.exe setup.py install

Update environment variable

Refer to http://www.helpwithwindows.com/WindowsXP/howto-04.html

  1. Add path C:\Python27
  2. Add path C:\Python27\Scripts
  3. Reopen the command prompt

Use pip

For example, we want to install the networkx package [http://networkx.lanl.gov/]

pip install networkx

本篇發表於 Programming 並標籤為 , , , 。將永久鏈結加入書籤。

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *