2015-05-28 07:46:28 +02:00
|
|
|
# Search for packages
|
|
|
|
pip search SomePackage
|
|
|
|
|
|
|
|
# Install some packages
|
|
|
|
pip install SomePackage
|
|
|
|
|
2016-03-15 17:15:06 +01:00
|
|
|
# Install some package in user space
|
|
|
|
pip install --user SomePackage
|
|
|
|
|
|
|
|
# Upgrade some package
|
|
|
|
pip install --upgrade SomePackage
|
|
|
|
|
2015-06-02 01:30:34 +02:00
|
|
|
# Output and install packages in a requirement file
|
|
|
|
pip freeze > requirements.txt
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
2015-05-28 07:46:28 +02:00
|
|
|
# Show details of a package
|
|
|
|
pip show SomePackage
|
|
|
|
|
|
|
|
# List outdated packages
|
|
|
|
pip list --outdated
|
|
|
|
|
|
|
|
# Upgrade all outdated packages, thanks to http://stackoverflow.com/a/3452888
|
|
|
|
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
|
|
|
|
|
|
|
|
# Install specific version of a package
|
|
|
|
pip install -I SomePackage1==1.1.0 'SomePackage2>=1.0.4'
|