[Answer]-Website using default python interpreter instead of install virtualenv interpreter

1👍

I just use the wsgi.py file generated by manage.py startproject and then put something like this in my httpd conf file:

WSGIScriptAlias / /full/path/to/wsgi.py
WSGIPythonPath /full/path/to/django/project:/full/path/to/django-venv/lib/python2.7/site-packages

The official docs cover this.

0👍

If you just run it in the shell, that only affects that shell session, and doesn’t even persist between logins, let alone affecting any system-wide services like Apache.

Normally you would put something in your wsgi.py:

activate_this = '/path/to/virtualenv/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))

Leave a comment