pip is the standard, de-facto package installer for Python. Created to be a better alternative to easy_install. In fact, pip enables you to install and manage additional packages, usually from PyPI that are not part of the standard Python library.
This short article is going to show you how to install multiple packages in one line using
Install multiple packages from command line
pip is made to manage the installation of third-party packages, one of the functionality is installing packages via
pip install package_name command.
In order to installing multiple packages all at once with pip, you can simply pass a list of all the packages you want to install, separated by spaces. For example:
pip install ipython requests pylint autopep8
The command above installs all the dependencies along with the packages as well, so you don't have to worry about broken installation.
pip: Install multiple packages from requirements.txt
If you have a file that contains a list of all packages you need (usually named
requirements.txt), you can use the following commands to quickly download and install all of them.
pip install -r requirements.txt
The file doesn't have to be named
requirements.txt for the command to work, though.
If your machine crashes during the importing process, you may try to pass
--no-cache-dir switch to disable caching in
pip install --no-cache-dir -r requirements.txt