2014-02-22 08:58:32 -05:00
|
|
|
# pip
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
> Python package manager.
|
2021-09-13 10:21:21 +02:00
|
|
|
> Some subcommands such as `pip install` have their own usage documentation.
|
2019-06-03 02:06:36 +02:00
|
|
|
> More information: <https://pip.pypa.io>.
|
2014-02-22 08:58:32 -05:00
|
|
|
|
2020-12-30 05:25:03 -08:00
|
|
|
- Install a package (see `pip install` for more install examples):
|
2014-02-22 08:58:32 -05:00
|
|
|
|
2023-08-26 23:00:06 +05:30
|
|
|
`pip install {{package}}`
|
2014-02-22 08:58:32 -05:00
|
|
|
|
2021-11-07 08:25:16 -05:00
|
|
|
- Install a package to the user's directory instead of the system-wide default location:
|
|
|
|
|
|
|
|
`pip install --user {{package}}`
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Upgrade a package:
|
2014-02-22 08:58:32 -05:00
|
|
|
|
2023-08-26 23:00:06 +05:30
|
|
|
`pip install --upgrade {{package}}`
|
2014-02-22 08:58:32 -05:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Uninstall a package:
|
2014-02-22 08:58:32 -05:00
|
|
|
|
2023-08-26 23:00:06 +05:30
|
|
|
`pip uninstall {{package}}`
|
2014-02-22 08:58:32 -05:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Save installed packages to file:
|
2014-02-22 08:58:32 -05:00
|
|
|
|
|
|
|
`pip freeze > {{requirements.txt}}`
|
|
|
|
|
2019-04-18 14:02:08 +08:00
|
|
|
- Show installed package info:
|
|
|
|
|
2023-08-26 23:00:06 +05:30
|
|
|
`pip show {{package}}`
|
2022-06-28 12:05:03 +05:30
|
|
|
|
|
|
|
- Install packages from a file:
|
|
|
|
|
|
|
|
`pip install --requirement {{requirements.txt}}`
|