The Python packaging ecosystem
Python has a very active ecosystem of third-party open source packages that covers a wide variety of topics and enables the power of any Python program to be enhanced. You can take advantage of installing them by using pip
, which is installed automatically for any new Python install.
For example, to install the package named requests
, a package allowing the compilation of easier and more powerful HTTP requests, the command is:
$ pip3 install requests
pip
searches in the Python Package Index automatically to see whether the package is available and if it is, it will download it and install it.
Note that the pip
command could take the form of pip3
. This depends on the installation of Python in your system. We will use them indistinctly.
We will see more detailed usage on pip
later in the chapter, but first, we need to discuss the main source where the packages are downloaded.
PyPI
The Python Package Index (PyPI...