Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 0 down vote accepted

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

share|improve this answer

i know it does not answer your question but lenny has reached end of life.

if this server is internet facing you should upgrade very very quickly to squeeze.

share|improve this answer
    
OK, I see. This is vps server, can I upgrade it to Squeeze? –  I159 Feb 23 '12 at 7:56
    
@I159 If it's vanilla Debian, then yes, it can almost certainly be upgraded. You'll want to read up on performing a dist-upgrade. Whether or not your VPS provider will support this is another question, you will need to contact them. –  jscott Feb 23 '12 at 12:01

Why not use virtualenv to install the required Python version for your Django app without having to touch the system wide Python install?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.