I'm configuring Debian 5 to run my Django app. The required application is required incompatible with Python 2.5 packages. I installed Python 2.7 and created the symlink python -> /usr/bin/python2.7/bin/python
. After I installed mod_wsgi ./configure --with-python=/usr/bin/python2.7/bin/python
and added to httpd.conf WSGIPythonHome /usr/bin/python2.7/bin/python
.
Now I have a couple of problems. At first – after I manually installed setuptools and pip, at calling pip install -r requirements.txt
of I have got an error:
raceback (most recent call last):
File "/usr/bin/pip", line 5, in
from pkg_resources import load_entry_point
File "build/bdist.linux-i686/egg/pkg_resources.py", line 2607, in
File "build/bdist.linux-i686/egg/pkg_resources.py", line 565, in resolve
pkg_resources.DistributionNotFound: pip==1.0.2
How to fix the DistributionNotFound
problem?
At second: in the system was installed mod_wsgi via apt-get, I manually compiled mod_wsgi 2.5 with configure flag without removing of existing version.
The app is not fire up now, how to check, as mod_wsgi works right?
Best Answer
You should not set WSGIPythonHome for a start. Even in situations where it is set, you don't set it to the executable path. As per documentation you set it to what sys.prefix is for Python installation you want to use.
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonHome
As for checking whether mod_wsgi working, read:
http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation
and setup a WSGI hello world program first, not a complex Django system.
See:
http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
and watch:
http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations