Python: install dependencies from requirements.txt
Install all packages of a Python project with pip install -r.
To install all the dependencies of a Python project in one go, use pip with a requirements.txt file that lists the packages (one per line, optionally with a version).
sudo pip install -r requirements.txt
The -r option tells pip to read the package list from the file. sudo installs the packages system-wide; for a project it is usually better to work in a virtual environment (python -m venv) and run the command without sudo.
For a complete example of deploying a Django application with PostgreSQL, Nginx and Gunicorn, see the DigitalOcean tutorial (Ubuntu 16.04).