I'm following this tutorial to deploy my Django app, but modified my executable /var/www/my_django_project/bin/gunicorn_start
to use my conda env instead of virtualenv.
CONDA_SRC=/home/justin/anaconda3/etc/profile.d/conda.sh
GUNICORN=/home/justin/anaconda3/pkgs/gunicorn-20.0.4-py38_0/bin/gunicorn
...
source $CONDA_SRC
conda activate myenv
When executing sudo bin/gunicorn_start
, I got:
“starting backend”
bin/gunicorn_start: /home/justin/anaconda3/pkgs/gunicorn-20.0.4-py38_0/bin/gunicorn: /opt/anaconda1anaconda2anaconda3/bin/python: bad interpreter: No such file or directory
bin/gunicorn_start: line 25: /home/justin/anaconda3/pkgs/gunicorn-20.0.4-py38_0/bin/gunicorn: Success
and my supervisor.log shows:
supervisor: couldn't exec /var/www/my_django_project/bin/gunicorn_start: EACCES
supervisor: child process was not spawned