In order to successfully deploy and run a Python application, some additional modules or other packages may be required to be installed. Herewith, it is a common practice to run Python web applications in isolated virtual environments, for example using the virtual environment tool, which allows managing projects independently and without the administrator privileges.
1. To create and start a new virtual environment, go to Settings > SSH > Web SSH and run the following commands:
virtualenv {appName}
source {appName}/bin/activate

2. The management of the required software packages is commonly provided by pip – a popular Python package management system for the PiPI repository. Below, some of the most common commands are listed:
- pip install {packageName} – installs a necessary module
- pip uninstall {packageName} – removes previously installed module
- pip install -upgrade {packageName} – updates the specified module to its latest version
- pip install -r requirements.txt – installs all the modules, listed in the requirements.txt file
- pip list – shows the set of already installed modules