cPanel, How to use Python on cPanel

You can use Python for scripting and programming on the platform.

Initial Setup

The cPanel dashboard includes a utility that allows you to choose the Python version and install additional modules.

  1. Log in to your cPanel account dashboard at
  2. In the Software section of the dashboard, click on the Setup Python App utility.
  3. Choose the Python version you want from those available.
  4. Enter a directory name in your home directory where you would like your application files to be stored.
  5. Enter the name your application will be referred to in the browser. The domain is already provided for you.
  6. Click Setup and wait for the page to update. 

When it is done with the configuration, your new application will be listed under the "Existing applications" section.

Post Setup

Once the application is configured, you can change the directory, the URI and the version of Python you are using in the Existing Applications section.  

The newly created application will be supplied with a stub only. The real application can be developed or put into the application folder now.

After the application is ready in the application folder, the wsgi parameter can be set (See below).

Module Installation

In the Existing Applications section, there is a Modules field.

  1. Start typing a module name in the input field, and a list of Python extension choices will be displayed
  2. Choose the entry you want from the drop-down and click Add

You can also delete extensions from this interface as well.

WSGI Parameter

The WSGI entry is to specify the Python WSGI application entry point. It must be specified as a filename, must be callable and separated by a colon.

For example, if your app is running from the file flask/ by calling callable app, set WSGI to flask/ .

Execute Commands

You can run simple commands from the web interface. For example, you can install packages from specific repositories or control web applications by means of django-admin by entering the command in the "Execute command" input field.

Keywords:cPanel, web hosting, python, scripting, programming   Doc ID:84995
Owner:Web H.Group:University of Illinois Technology Services
Created:2018-08-17 15:54 CDTUpdated:2019-01-14 16:50 CDT
Sites:University of Illinois Technology Services
Feedback:  7   19