Nossa base de conhecimento está disponível apenas em inglês atualmente. Estamos em processo de tradução destas páginas e vamos publicá-las assim que estiverem disponíveis.
Base de Conhecimento
Using the Python Selector to choose a Python version
This article describes how to use the Python Selector in cPanel to select a Python version for use with an application, use a virtual environment for that version and use Passenger to publish the application to the web.
To choose a Python version and set up the application follow these steps:
- Log in to cPanel.
If you do not know how to log in to your cPanel account, please see this article
- In the SOFTWARE section of the cPanel home screen, click Setup Python App.
- Under Setup new application, create a new application:
- In the Python version list box, select the required Python version.
- In the App Directory text box, type a directory name for the application.
- In the App Domain/URI list box, select the domain, and then type a URL for the application.
- Click Setup. cPanel creates the application and sets up the Python environment.
- To work inside the newly created environment, connect to your account using SSH, and then type the following command. Enter the command as shown below, replacing username, application, and version with the actual values as shown next to Command for entering to virtual environment in the Python Selector.
- It is now possible to install modules or use other commands to develop the new Python application.