First time here? Check out the FAQ!

Revision history  [back]

Solved this problem by correcting the WSGIPythonHome and WSGIPythonPath values in wsgi.conf file. My wsgi.conf file contents as follows,

LoadModule wsgi_module modules/mod_wsgi.so

#the following two directories must be both readable and writable by apache
WSGISocketPrefix /var/run/wsgi
WSGIPythonEggs /var/python/eggs

#the following directory must be readable by apache
WSGIPythonHome /usr
WSGIPythonPath /usr/bin

After this, added the following few lines of code into django.wsgi file exists at /path/to/askbotdjangosite/

import site

# Add the site-packages of the chosen virtualenv to work with
site.addsitedir('/path/to/virtual/askbot/lib64/python2.6/site-packages')

# Activate your virtual env
activate_env=os.path.expanduser("/path/to/virtual/askbot/bin/activate_this.py")
execfile(activate_env, dict(__file__=activate_env))

And this has resolved my issues.

@Evgeny, Thanks for your comments.