I'm trying to run a python3 flask web application with uwsgi.
If I run /usr/bin/uwsgi --ini /var/www/QCQuan/uwsgi_config.ini --logto /tmp/log
then uwsgi
fails and the log file shows:
Python version: 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
Set PythonHome to /home/pdiracdelta/.conda/envs/qcquan
ImportError: No module named site
Even though I did adapt my uwsgi_config.ini with
[uwsgi]
...
venv = /home/pdiracdelta/.conda/envs/qcquan
plugins = python
...
to use the python plugin which I installed with apt-get install uwsgi-plugin-python
and to use the conda virtual environment which has all the right packages, and only python3.
It seems that uwsgi is still trying to use my system's /usr/bin/python, which points to python2. And it also seems to load it before it sets the PythonHome.
How can I tell uwsgi to use the python (=python3) provided by the conda environment?