← Go Back

How to Install Third-Party Packages

Python uses a tool called pip to install third-party modules and packages (that is, those that are not included in the standard library). To install a new package, execute the following command:

pip install <package-name>

For example, to install the Requests library:

pip install requests

If your system does not recognize the pip command, then try the following:

python -m pip install <package-name>

Packages that can be installed via pip are stored and listed on pypi.org.

Some legacy packages are not distributed this way but rather via a compressed file that includes their source code. In those cases, once the content has been extracted, run the following command to install it:

python setup.py install


pip packages modules


🐍 You might also find interesting: