skip to Main Content

I have a shared Cpanel host with the Litespeed web server. I want to deploy a Django application on it. After creating a Python application inside the Cpanel where I have not deployed the application on the host I try loading the website, and instead of displaying the Django version, I face 503 Unavailable!!
Also inside the "stderr.log" file, there is the following error.

/usr/local/lsws/fcgi-bin/lswsgi_wrapper: line 9: /opt/alt/python39/bin/lswsgi: No such file or directory

I’m creating the application with Python 3.9.


But it works when I create it with Python 3.8 and show the following message when I load the web,

It works!

Python 3.8.6

2

Answers


  1. The issue is mostly caused by the lack of the Python 3.9 WSGI package. On out-of-date versions of LiteSpeed, the package needs to be installed manually.

    To work around this, first ensure that LiteSpeed is up to date. LiteSpeed must be at version 5.4.10 for this to work. Once that is confirmed, execute the following script from LiteSpeed. It will pull the required Python Selector packages:

    /usr/local/lsws/admin/misc/enable_ruby_python_selector.sh
    

    Refer cpanel support

    Login or Signup to reply.
  2. I my case I might to downgrade a Python version via cPanel

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search