Python pip Cheatsheet
Python pip Cheatsheet
General
Check locally installed package:
$ pip list --local
Check outdated packages:
$ pip list --outdated
Export requirements.txt
file:
$ pip freeze > requirements.txt
Installation
Install package:
$ pip install <pkg1> <pkg2>=1.1 # we can specify package version
Update outdated package:
$ pip install -U <pkg1> <pkg2> # -U is equivalent to --upgrade
Install packages using requirements.txt
file:
$ pip install -r requirements.txt
Install packages in the development mode. The project needs setup.py
or pyproject.toml
.
$ pip install -e .