skip to content

Managed Web Service Help & Support


Python support in Debian 9 (Stretch)

Python v3.5.3 is installed on MWS servers running Debian 9 (Stretch), and the Apache module WSGI3 is installed by default.

This allows you to host a python website using a Python-based framework such as Django, Flask, etc. Please note that these frameworks are not provided on the MWS, so you would need to install them yourself in a virtual environment. Users are expected to be familiar with creating virtual environments and configuring a web application to work with Apache 2.4's mod_wsgi. We suggest using the admindir directory to store them.

To create virtual environments in Debian 9 (Stretch), you should use the included venv module, e.g.

python -m venv /var/www/<site_name>/admindir/<venv_name>

For Debian 9 (Stretch) the recommended MySQL/MariaDB connection driver is mysqlclient.

You will need to configure your .htaccess properly in order to make your python-based website work.