I am using the Django OpenLiteSpeed One-Click app. I can’t get OpenLiteSpeed beyond the example site.
I get 503 or it just keeps loading. In the log I get: Fatal Python error: Py_Initialize: Unable to get the locale encoding ModuleNotFoundError: No module named ‘encodings’
All I need to do to break it is set the example to use Mysql.
If you change back to sqllite3 it works fine. I know it work because if i use the django test server “python manage.py runserver 0.0.0.0:8000” so the venv is setup correctly.
I have tried adding to the context: PYTHONHOME=/usr/local/lsws/Example/venv/ LS_PYTHONBIN=/usr/local/lsws/Example/venv/bin/python Any Ideas?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
HI
How about keep PYTHONHOME=/usr/local/lsws/Example/venv/ only in the Environment?
Best
Hi,
Yes that was the 1 st thing I did. I just tried again and I get the same result.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
