I am trying to build a VM "appliance" that will be running uwsgi/Django. This uses a python virtualenv, so uwsgi only starts when within that virtualenv. When I try to run it outside of a virtualenv, I get this error:
Within the virtualenv, I have the 'site' module installed, but it still fails.
Is there a way to run uwsgi when outside of a virtualenv? If not, is there a way to initialize a virtualenv from within the startup script only for the script?
My very simple config.ini is as follows:
Code:
$ uwsgi config.ini
[uWSGI] getting INI configuration from config.ini
*** Starting uWSGI 2.0.15 (64bit) on [Sun Jul 23 09:23:10 2017] ***
compiled with version: 4.2.1 Compatible FreeBSD Clang 3.8.0 (tags/RELEASE_380/final 262564) on 29 June 2017 06:51:11
os: FreeBSD-11.1-RC1 FreeBSD 11.1-RC1 #0 r320486: Fri Jun 30 02:25:16 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC
nodename: axial
machine: amd64
clock source: unix
detected number of CPU cores: 1
current working directory: /usr/home/axial/axial
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 5734
your memory page size is 4096 bytes
detected max file descriptor number: 28467
lock engine: POSIX semaphores
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:3031 fd 3
Python version: 2.7.13 (default, Jun 29 2017, 01:17:13) [GCC 4.2.1 Compatible FreeBSD Clang 3.8.0 (tags/RELEASE_380/final 262564)]
Set PythonHome to /usr/home/axial/venv/
ImportError: No module named site
Is there a way to run uwsgi when outside of a virtualenv? If not, is there a way to initialize a virtualenv from within the startup script only for the script?
My very simple config.ini is as follows:
Code:
[uwsgi]
socket = 127.0.0.1:3031
wsgi-file = /usr/home/user/axial/axial/wsgi.py
workers = 1
virtualenv = /usr/home/user/venv/
pythonpath = /usr/home/user/venv/bin/python3