# Install third-party Python packages with pip

> Learn how to install third-party Python packages from PyPI using pip, from pip install to upgrading, pinning a version, uninstalling, and showing details.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2021-02-01 | Topics: [Python](https://flaviocopes.com/tags/python/) | Canonical: https://flaviocopes.com/python-pip/

The [Python standard library](https://flaviocopes.com/python-standard-library/) contains a huge number of utilities that simplify our [Python](https://flaviocopes.com/python-introduction/) development needs, but nothing can satisfy _everything_.

That's why individuals and companies create packages, and make them available as open source software for the entire community.

Those modules are all collected in a single place, the **Python Package Index** available at https://pypi.org, and they can be installed on your system using `pip`.

There are more than 270.000 packages freely available, at the time of writing.

> You should have `pip` already installed if you followed the Python installation instructions.

Install any package using the command `pip install`:

```
pip install <package>
```

or, if you do have troubles, you can also run it through `python -m`:

```
python -m pip install <package>
```

For example you can install the [`requests`](https://pypi.org/project/requests/) package, a popular HTTP library:

```
pip install requests
```

and once you do, it will be available for all your Python scripts, because packages are installed globally.

The exact location depends on your operating system.

On macOS, running Python 3.9, the location is `/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages`.

Upgrade a package to its latest version using:

```
pip install –U <package>
```

Install a specific version of a package using:

```
pip install <package>==<version>
```

Uninstall a package using:

```
pip uninstall <package>
```

Show an installed package details, including version, documentation website and author information using:

```
pip show <package>
```
