This tutorial explains how install Python apps on cPanel.
- Login to your cPanel account.
- Upload your application directory to your cPanel account using FTP or cPanel “File Manager”.
- From cPanel dashboard go to Setup Python App
- In Setup Python App interface click “CREATE APPLICATION”
- You will be required to fill some options regarding your application as follows:
Python version: Python version that your app will use to run and install dependencies.
- Application root: The directory path where all app files will reside.
- Application URL: the URL to enter in the browser to visit the app.
Application startup file: The Path to wsgi.pg file.
- Application Entry point: Setup wsgi callable object for your application.
- Environment Variables: Optionally you can add environment variables to your application.
- After you are done, click “CREATE” to finish setting up the app.
- If you want to install python modules with your app, add requirements.txt file in your Application root directory then add it in Configuration files section as shown in the following screenshot.
- Click Run Pip Install to install your app dependencies
- When everything is done, Save and RESTART your app.