Python

Introduction

Warning

Python applications belong in your Home Directory, not in your DocumentRoot.

Python is an interpreted programming language, created by Guido van Rossum in 1991. It is used for a wide range of tasks from basic scripting to full-fledged web applications.

Versions

Release Types

Each release branch of Python is fully supported for five years beginning with its initial stable release. For Python 2.7, this has been extended to ten years. We provide different point releases and apply security updates on a regular basis. Currently, these Python versions are available: 2.7, 3.4, 3.5, and 3.6.

Standard version

If you don’t select a certain version, our default will be used. We decided to default to version 2.7.

Change version

To change your python version, run the relevant binary. So if you want to start a script with version 3.6, use the python3.6 binary:

[eliza@dolitte ~] python3.6 my-python-script.py

To specify version 2.7 in a shebang, use #!/usr/bin/env python2.7.

Update Policy

We update all versions on a regular basis. Once the security support ends, the branch reaches its end of life, is no longer supported and will be removed from our servers.

Branch State Security Support Until
2.7 Bug fixes January 2024 (by CentOS)
3.4 Security fixes only March 2019
3.5 Security fixes only September 2020
3.6 Bug fixes December 2021

Connection to webserver

In order to make your application accessable from the outside, you need to connect it to the webserver, using a web backend. Please note that your application must listen on the IP 0.0.0.0. You can choose any port between 1024 and 65535.

pip

pip is Python’s package manager, used to install and manage additional packages. You can only install software to your home directory, so please always use the --user option when running pip.

Versions

In order to install the correct package corresponding to the Python version you want to use, you should run the correct binary. For example, to install a package for Python 2.7, use pip2.7:

[eliza@dolitte ~] pip2.7 install package-name --user

To install for Python 3.6, use pip3.6:

[eliza@dolitte ~] pip3.6 install package-name --user