1, pip download installation
1.1 Pip Download
| The code is as follows |
Copy Code |
# wget "HTTPS://PYPI.PYTHON.ORG/PACKAGES/SOURCE/P/PIP/PIP-1.5.4.TAR.GZ#MD5=834B2904F92D46AAA333267FB1C922BB"-- No-check-certificate
|
1.2 PIP Installation
| The code is as follows |
Copy Code |
# TAR-XZVF Pip-1.5.4.tar.gz # CD pip-1.5.4 # python setup.py Install
|
2. Pip use detailed
2.1 PIP Installation software
| The code is as follows |
Copy Code |
# pip Install Somepackage [...] Successfully installed Somepackage
|
2.2 PIP View installed software
| The code is as follows |
Copy Code |
# pip Show--files somepackage Name:somepackage version:1.0 Location:/my/env/lib/pythonx.x/site-packages Files: .. /somepackage/__init__.py [...]
|
2.3 pip check which software needs to be updated
| The code is as follows |
Copy Code |
# PIP List--outdated Somepackage (current:1.0 latest:2.0)
|
2.4 Pip Upgrade Software
| The code is as follows |
Copy Code |
# pip Install--upgrade somepackage [...] Found Existing Installation:somepackage 1.0 Uninstalling Somepackage: Successfully uninstalled Somepackage Running setup.py Install for Somepackage Successfully installed Somepackage
|
2.5 pip Uninstall software
| The code is as follows |
Copy Code |
$ pip Uninstall Somepackage Uninstalling Somepackage: /my/env/lib/pythonx.x/site-packages/somepackage Proceed (y/n)? Y Successfully uninstalled Somepackage
|
3. Pip Use Example
3.1 Installation Redis
| The code is as follows |
Copy Code |
# pip Install Redis
|
3.2 Uninstall Redis
| The code is as follows |
Copy Code |
# pip Uninstall Redis Uninstalling Redis: /usr/lib/python2.6/site-packages/redis-2.9.1-py2.6.egg-info ..... Omit some content .... Proceed (y/n)? Y Successfully uninstalled Redis
|
3.3 View the software to be updated
| The code is as follows |
Copy Code |
Pip List--outdate Pygpgme (current:0.1 latest:0.3) Pycurl (current:7.19.0 latest:7.19.3.1) Iniparse (current:0.3.1 latest:0.4)
|
4. Common Mistakes
4.1 importerror No module named Setuptools
Please refer to "Importerror No module named Setuptools resolution"
5. PIP parameter Explanation
| The code is as follows |
Copy Code |
# pip--help
Usage: Pip <command> [Options]
Commands: Install install the software. Uninstall uninstall software. Freeze the list of installed software in a certain format List lists the installed software. Show shows software details. Search software, similar to searches in Yum. Wheel build wheels from your requirements. Zip is not recommended. Zip individual packages. Unzip is not recommended. Unzip individual packages. Bundle is not recommended. Create Pybundles. Help is currently helping.
General Options: -H,--help display Help. -V,--verbose more output, can be used up to 3 times -V,--version the actual version information and then exits. -Q,--quiet the least output. --log-file <path> overwrite way to record verbose error log, default file:/root/.pip/pip.log --log <path> does not overwrite logs that record verbose output. --proxy <proxy> Specify a proxy in the form [User:passwd@]proxy.server:port. --timeout <sec> Connection Timeout (default 15 seconds). --exists-action <action> Default Action when a path already exists: (s) witch, (i) Gnore, (W) Ipe, (b) ackup. --cert <path> Certificate. |
6. End
Installation using a glance, too simple. The boss doesn't want me to install the software any more.
Original from: ttlsa.com