Sean Glover
seanglover at sympatico.ca
Mon Apr 23 18:52:12 EDT 2007
Hi Graham, I stopped apache before I installed mod_python, but just to be sure I tried it again. I have several versions of python installed on my system. I symlinked 'python' to the compiled python2.5 executable. My /usr/local/bin directory has the following python entries: lrwxr-xr-x 1 root wheel 9 Apr 20 12:38 python -> python2.5 lrwxr-xr-x 1 root wheel 16 Mar 9 06:45 python-config -> python2.5-config -r-xr-xr-x 2 root wheel 3252 Apr 9 20:32 python-shared -r-xr-xr-x 1 root wheel 3252 Jan 11 04:47 python-shared2.3 -r-xr-xr-x 2 root wheel 3252 Apr 9 20:32 python-shared2.4 -r-xr-xr-x 1 root wheel 3172 Apr 9 20:24 python-shared2.5 -r-xr-xr-x 1 root wheel 1288 Apr 9 20:24 python-shared2.5-config -r-xr-xr-x 1 root wheel 771932 Jan 11 04:46 python2.3 -r-xr-xr-x 2 root wheel 827180 Apr 9 20:32 python2.4 -r-xr-xr-x 1 root wheel 944656 Apr 9 20:23 python2.5 -r-xr-xr-x 1 root wheel 1281 Apr 9 20:24 python2.5-config I tried rearranging the entries in my $PATH env var for the www user which httpd runs under: -----Original Message----- From: Graham Dumpleton [mailto:graham.dumpleton at gmail.com] Sent: Monday, April 23, 2007 6:02 PM To: Sean Glover Cc: mod_python at modpython.org Subject: Re: [mod_python] mod_python, python_handler error "Can't get/create interpreter" On 24/04/07, Sean Glover <seanglover at sympatico.ca> wrote: > Hello, I recently started using python 2.5 on my FreeBSD machine. I had a > version of mod_python up and running (sorry, I don't recall which one) > against python 2.4. I used the ports packages system to install mod_python > 3.3.1 without incident. It replaced the old mod_python.so module and put > the necessary python modules in my python2.5 site-packages directory. I > left my httpd.conf configuration the same, restarted, When replacing mod_python version, always a good idea to do a 'stop' and 'start' rather than a 'restart', but presuming you would have eventually tried that. > and hit my mod_python > test page and receive an internal server error. Below is a paste from my > httpd-error.log. > > Could anyone suggest a solution to get mod_python (with python 2.5) working > with my apache 2.2 server again? How many versions of Python do you have installed on your system? I would probably guess you have older version of Python in /usr/bin still and Python when being initialised within mod_python is finding that old version, but the old version doesn't have the mod_python Python bits. Try setting the PATH environment variable for the user that runs Apache to have /usr/local/bin first in the path so that it finds the version of Python you want used before the operating system default version. BTW, are you sure there weren't a series of other error messages prior to those you quoted. Can you include the dozen of so lines before that point? Graham > # mod_python.so module > > -rwxr-xr-x 1 root wheel 122135 Apr 23 12:43 > /usr/local/libexec/apache22/mod_python.so > > > > # mod_python python modules (/usr/local/lib/python2.5/site-packages) > > drwxr-xr-x 2 root wheel 1024 Apr 23 12:43 mod_python > > -rw-r--r-- 1 root wheel 254 Apr 23 12:43 > mod_python-3.3.1-py2.5.egg-info > > > > # apache httpd.conf file entry > > LoadModule python_module libexec/apache22/mod_python.so > > > > # test .htaccess > (http://randonom.com/test/python/mptest.py) > > AddHandler mod_python .py > > PythonHandler mptest > > PythonDebug On > > > > # httpd-error.log after hitting the URL above ^ > > [Mon Apr 23 13:37:40 2007] [error] get_interpreter: no interpreter callback > found. > > [Mon Apr 23 13:37:40 2007] [error] [client 65.36.178.226] python_handler: > Can't get/create interpreter. > > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python > >
|