23π
You are missing a WSGIProcessGroup
directive or equivalent option on WSGIScriptAlias
, so your application isnβt actually being run in that daemon process group where you have set the virtual environment.
See Using mod_wsgi daemon mode
I would also recommend ensuring application group is set to β%{GLOBAL}β if that is the only application you are running in the daemon process group.
Thus use:
WSGIScriptAlias / /path/to/project/project/wsgi.py \
process-group=project application-group=%{GLOBAL}
Also better to use python-home
for the virtual environment.
WSGIDaemonProcess project python-path=/path/to/project \
python-home=/path/to/Envs/venv
See:
7π
My rep is not over 50 so I cannot comment, but Iβd like to share my discovery.
In WSGIDaemonProcess, if you are using Python 3.5, you need to set exactly as @graham-dumpleton say, with
python-home=/path/to/Envs/venv
set explicitly.
However, if you are using Python 3.4 (or some older version Python like 2.7 as far as I know), youβll have to configure it as
python-path=/path/to/project:/path/to/Envs/venv/lib/python3.4/site-packages
just like what the asker did.
Really weird.
- How do I install Mezzanine as a Django app?
- Some Celery tasks work, others are NotRegistered
- 'CheckoutView' object has no attribute 'object'
- Deploying Django to AWS β WSGIPath refers to a file that does not exist
- Django fixtures for permissions
5π
For me the problem was I had mod wsgi installed for python2. I had to reinstall it for python3:
sudo apt-get install libapache2-mod-wsgi-py3
- Django: WSGIRequest' object has no attribute 'user' on some pages?
- Django Grappelli Tabular Inline add new row TinyMCE textfield not editable
- Django-storages + sorl_thumbnail + S3 not working well together (URLs mismatch)
0π
The issue for me was that I was running libapache2-mod-wsgi-py3
on python version 3.9. When I rolled back the python version to 3.7, there was no issue.
- Django Rest Framework debug post and put requests
- Django queryset union appears not to be working when combined with .annotate()