Setup Python applications in cPanel on Cloudlinux

This tutorial explains how install Python apps on cPanel.

  1. Login to your cPanel account.
  2. Upload your application directory to your cPanel account using FTP or cPanel “File Manager”.
  3. From cPanel dashboard go to Setup Python App
    Setup Python App
  4. In Setup Python App interface click “CREATE APPLICATION”
    Create application
  5. 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.
      python app options
  6. After you are done, click “CREATE” to finish setting up the app.
  7. 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.
    requiremnets
  8. Click Run Pip Install to install your app dependencies
    Pip install
  9. When everything is done, Save and RESTART your app.
    Save and restart

  • Was this Helpful ?
  • Yes   No
in

Leave a comment

Required fields are marked