← Go Back
For example, to install the Requests library:
If your system does not recognize the pip command, then try the following:
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:
How to Install Third-Party Packages
Python uses a tool calledpip
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
🐍 You might also find interesting: