2.9.1. General information about Python

Notes:

After connecting to the hosting via SSH, you can check the version numbers of the interpreters and the lists of available modules.

For a list of available versions, see Supported technologies.

Python version check command (X.X — version number):

pythonX.X -V

Notes:

  • The version change occurs for the alias python.
  • Affects all new SSH connections.
  1. Open the "Linux configuration" section.
  2. In the "Python version" block, select the desired version and save the changes (for more details, see Linux configuration).
  3. Run the command source ~/.bashrc or . ~/.bashrc or simply reconnect via SSH.
Affects only commands that are run with a specific interpreter specified.

Path to the Python interpreter of the required version (X.X — version number):

/usr/bin/pythonX.X

Viewing the list of available modules:

  1. Enter interactive mode (X.X — Python version number):
    pythonX.X
  2. Execute the command:
    help('modules')
  3. To exit interactive mode, press Ctrl+D or execute the command:
    exit()

On the hosting, you can independently install additional modules. You can also submit a suggestion for the administration to consider the possibility of globally installing the module you need.

Content