This article describes how to use the Python Selector in the Control Panel to create a Python application that uses a specific Python version. Additionally, you can use a virtual environment to develop the application further.Table of Contents
Using the Python Selector
To create a new Python application that uses a specific Python version, follow these steps:
- Log in to the Control Panel.
- Open the Python App tool under EXTRA FEATURES:

3.Click CREATE APPLICATION:The application form appears:

4.In the Python version list box, select the Python version you want to use.
5.In the Application root text box, type the directory where the application files are located.
6.In the Application URL list box, select the domain, and then type a URL for the application.
7.In the Application startup file text box, you can optionally specify the startup file for the application.
If you do not specify a startup file, control Panel creates a passenger_wsgi.py startup file for you.
8.In the Application Entry point text box, you can optionally specify the callable object for the application.
If you do not specify the application entry point, the control panel will create a default application object for you.
9.Under Environment variables, you can optionally set environment variables for the application. To do this, click ADD VARIABLE, type the variable name and value, and then click DONE.
10.In the top right corner of the page, click CREATE: Direct admin control Panel creates the application and sets up the Python environment.
11.To work inside the newly created environment, connect to your account using SSH, and then type the following command. Replace username, application, and version with the actual values as shown at the top of the page, next to Enter to the virtual environment. To enter to virtual environment, run the command:
Copysource /home/username/virtualenv/application/version/bin/activate && cd /home/username/application You can now install modules or use other commands to develop the Python application further. Additionally, you can control the application’s running state from control Panel:
- To stop the application, click STOP APP.
- To restart the application, click RESTART.
- To completely remove the application from control Panel, click DESTROY.