Python – How to install multiple python packages at once using pip

pip, python

I know it's an easy way of doing it but i didn't find it neither here nor on google.
So i was curious if there is a way to install multiple packages using pip.
Something like:

pip install progra1 , progra2 ,progra3 ,progra4 . 

or:

pip install (command to read some txt containing the name of the modules) 

Best Solution

For installing multiple packages on the command line, just pass them as a space-delimited list, e.g.:

pip install wsgiref boto

For installing from a text file, then, from pip install --help:

-r FILENAME, --requirement=FILENAME

Install all the packages listed in the given requirements file. This option can be used multiple times.

Take a look at the pip documentation regarding requirements files for their general layout and syntax - note that you can generate one based on current environment / site-packages with pip freeze if you want a quick example - e.g. (based on having installed wsgiref and boto in a clean virtualenv):

$ pip freezeboto==2.3.0wsgiref==0.1.2