--- title: Python Package Management --- ## PIP pip is the package installer for Python, use to install packages from the [Python Package Index](https://pypi.org/) and other indexes. ### Most used command options Updating the `pip` version: ```{code-block} bash pip install -U pip ``` Get version information and package path information: ```{code-block} bash pip -V ``` Installing a Python package, example: `pytest`: ```{code-block} bash pip install pytest ``` Uninstalling Python package, example: `pytest`: ```{code-block} bash pip uninstall pytest ``` Installing a specific Python package version, example: `pytest 7.1.1`: ```{code-block} bash pip install pytest==7.1.1 ``` Listing the installed packages: ```{code-block} bash pip list ``` Saving the list of installed packages: ```{code-block} bash pip freeze > requirements.txt ``` Installing packages from the `requirements.txt` file: ```{code-block} bash pip install -r requirements.txt ``` {{page_break}}