Python has two well-known package management tools easy_install.py and PIP. In Python2.7 's installation package, easy_install.py is installed by default, and Pip requires us to install it manually.
Pip can be run on Unix/linux, OS X, and Windows platforms, support CPython versions 2.6, 2.7, 3.1, 3.2, 3.3, 3.4 and also pypy.
"Download"
Download Pip's installation package Get-pip.py,:https://pip.pypa.io/en/latest/installing.html#id7
"INSTALL"
1. Execute the following command on Windows:
1 python get-pip.py
2. Post-Installation verification:
After execution, in the Python installation directory under the Scripts subdirectory, you can see Pip.exe, Pip2.7.exe, Pip2.exe, etc., which indicates that PIP installation was successful.
Note: To be able to run the PIP program directly on the command line, you need to scripts this directory into the environment variable path.
PIP installation can also be installed using the installation options, such as specifying the location of the get-pip.py:
[Python] View plain copy
Python get-pip.py--no-index--find-links=c:\downloads
[python] view plain Copypython get-pip.py--no-index--find-links=c:\downloads
View Code
3. Installation under Linux
# on Debian and Ubuntu:sudo apt-get install python-pip #onFedorasudo yum install Python-pip
4. Upgrade Pip
# On Linux or OS Xpip install-#onWindows:python-m pip install-u pip
"USage"
# Install a package from PyPI: pip Install somepackage # #安装特定版本的package, by using = =, >=, <=, <, to specify a version number. Pip install ' markdown<2.0'markdown>2.0,<2.0.3
# #果有requirement的话, You can install all of them directly.
Pip Install-r requirements.txt
# #Uninstall a package: ##Upgrade a package:pip install –##Show What files were installed: pip Show-files Somepackage##List What packages is outdated:pip List-- Outdated##例如: List all files that list the Selunium package
The result of the execution is to list all the files for the Selunium package and the results are all files that list the Selunium package
Python package management PIP installation and use