2020-02-11 12:37:58 +01:00
|
|
|
==========
|
2013-01-18 22:25:15 +01:00
|
|
|
Quickstart
|
|
|
|
==========
|
|
|
|
|
2017-12-22 10:24:44 +01:00
|
|
|
First, :doc:`install pip <installing>`.
|
2014-02-12 06:55:43 +01:00
|
|
|
|
|
|
|
Install a package from `PyPI`_:
|
2013-01-18 22:25:15 +01:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2014-02-12 06:55:43 +01:00
|
|
|
$ pip install SomePackage
|
2017-11-07 07:58:35 +01:00
|
|
|
[...]
|
|
|
|
Successfully installed SomePackage
|
2013-01-18 22:25:15 +01:00
|
|
|
|
2017-12-22 10:25:34 +01:00
|
|
|
Install a package that's already been downloaded from `PyPI`_ or
|
|
|
|
obtained from elsewhere. This is useful if the target machine does not have a
|
|
|
|
network connection:
|
2016-01-28 22:17:47 +01:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$ pip install SomePackage-1.0-py2.py3-none-any.whl
|
2017-11-07 07:58:35 +01:00
|
|
|
[...]
|
|
|
|
Successfully installed SomePackage
|
2016-01-28 22:17:47 +01:00
|
|
|
|
2013-01-18 22:25:15 +01:00
|
|
|
Show what files were installed:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$ pip show --files SomePackage
|
2017-11-07 07:58:35 +01:00
|
|
|
Name: SomePackage
|
|
|
|
Version: 1.0
|
|
|
|
Location: /my/env/lib/pythonx.x/site-packages
|
|
|
|
Files:
|
|
|
|
../somepackage/__init__.py
|
|
|
|
[...]
|
2013-01-18 22:25:15 +01:00
|
|
|
|
|
|
|
List what packages are outdated:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$ pip list --outdated
|
2017-11-07 07:58:35 +01:00
|
|
|
SomePackage (Current: 1.0 Latest: 2.0)
|
2013-01-18 22:25:15 +01:00
|
|
|
|
|
|
|
Upgrade a package:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$ pip install --upgrade SomePackage
|
2017-11-07 07:58:35 +01:00
|
|
|
[...]
|
|
|
|
Found existing installation: SomePackage 1.0
|
|
|
|
Uninstalling SomePackage:
|
|
|
|
Successfully uninstalled SomePackage
|
|
|
|
Running setup.py install for SomePackage
|
|
|
|
Successfully installed SomePackage
|
2013-01-18 22:25:15 +01:00
|
|
|
|
|
|
|
Uninstall a package:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$ pip uninstall SomePackage
|
2017-11-07 07:58:35 +01:00
|
|
|
Uninstalling SomePackage:
|
|
|
|
/my/env/lib/pythonx.x/site-packages/somepackage
|
|
|
|
Proceed (y/n)? y
|
|
|
|
Successfully uninstalled SomePackage
|
2013-01-18 22:25:15 +01:00
|
|
|
|
2014-02-12 06:55:43 +01:00
|
|
|
|
2018-04-13 14:08:51 +02:00
|
|
|
.. _PyPI: https://pypi.org/
|