The standard packaging tools are all designed to be used from the command line. 

## BASIC USAGE 

The following command will install the latest version of a module and its dependencies from the Python Packaging Index: 

python -m pip install SomePackage 

Note: For POSIX users (including Mac OS X and Linux users), the examples in this guide assume the use of a virtual environment . 

For Windows users, the examples in this guide assume that the option to adjust the system PATH environment variable was selected when installing Python. 

It’s also possible to specify an exact or minimum version directly on the command line. When using comparator operators such as > , $_{<}$or some other special character which get interpreted by shell, the package name and the version should be enclosed within double quotes: 

python -m pip install SomePackage==1.0.4 # specific version python -m pip install "SomePackage>=1.0.4" # minimum version 

Normally, if a suitable module is already installed, attempting to install it again will have no effect. Upgrading existing modules must be requested explicitly: 

python -m pip install --upgrade SomePackage 

More information and resources regarding$_{pip}$ and its capabilities can be found in the Python Packaging User Guide. 

Creation of virtual environments is done through the$_{venv}$ module. Installing packages into an active virtual envi- ronment uses the commands shown above. 

See also: 

Python Packaging User Guide: Installing Python Distribution Packages 

