PipIt is a tool for installing and managing Python packages and a replacement product for easy_install. This article describes how to install pip and some basic operations such as installing, updating, and uninstalling the python package.
1. pip Installation
The method for installing pip is very simple. First download a python program and then run it. This is online installation.
12 |
$ curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py $ python get-pip.py |
If you cannot connect to the Internet, you can download it here and install it according to the instructions of the compressed package.
To install the development version of pip, run the following command:
Development Kit source code: pip development version
Ii. pip operations
The basic operations of pip include installing, upgrading, and uninstalling the python package. Use the following command, and use the simplejson package as an example.
1. Install the python package
1 |
$ pip install simplejson |
2. Upgrade the python package
123 |
$ pip install --upgrade simplejson [... progress report ...] Successfully installed simplejson |
3. Uninstall the python package
123456 |
$ pip uninstall simplejson Uninstalling simplejson: /home/me/env/lib/python2.7/site-packages/simplejson /home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info Proceed (y/n)? y Successfully uninstalled simplejson |
For more pip installation and use tutorials, go to the pip documentation website.
References
- Pip 1.1 installation and use tutorial-in English, briefly introduces all aspects of pip, including pip installation and use tutorial.