4

I keep getting these errors in my Apache logs:

[error] python_init: Python version mismatch, expected '2.6.5+', found '2.6.6'.
[error] python_init: Python executable found '/usr/bin/python'.
[error] python_init: Python path being used '/usr/lib/python2.6/:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload'.
[notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[notice] mod_python: using mutex_directory /tmp 

From what I've read, these errors come from mod_python. I'm using Flask and WSGI for my Python project, however, so I don't know why these errors are coming up.

Is there an easy way I can delete mod_python? - I've tried a2dismod, but mod_python doesn't appear to exist, even though I see it within Apache's mods-available directory.

EDIT: I've just tried a2dismod python, and that seems to have worked. I think I n00bishly was trying to disable mod_python. My Python apps still appear to work just fine.

Thanks in advance!

user1492385
  • 105
  • 1
  • 9

1 Answers1

8

Look through your httpd.conf file, and remove the line that says:

LoadModule mod_python   /path/to/mod_python.so

Then restart apache:

apachectl restart
Josh Smeaton
  • 47,939
  • 24
  • 129
  • 164
  • 2
    My httpd.conf file was empty, I tried **a2dismod python** and that seemed to work, before I was trying **a2dismod mod_python**. I'm a bit new at this >.<. – user1492385 Jun 30 '12 at 01:11
  • If your httpd.conf file is empty, then there's probably a different conf file used to load various modules. I was unaware of the a2dismod tool. – Josh Smeaton Jun 30 '12 at 01:16