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