[mod_python] make_obcallback: could not import mod_python. apache.

Graham Dumpleton graham.dumpleton at gmail.com
Sat Apr 14 03:28:42 EDT 2007


If you don't have root access to the server, how did you get the
Apache mod_python.so module installed in the first place, or are you
using Apache out of your own account?

If you had to install the Python bits of mod_python in your own
account, the only choice, is to set the PYTHONPATH environment
variable in the user environment that Apache runs as to list where you
had to install stuff in your own directory. If Apache is run as root
though, you aren't going to be able to do that and if you could get
that done, you may as well get mod_python installed properly.

On 13/04/07, Jochen Wuttke <jochen.wuttke at gmx.de> wrote:
> Hi,
>
>
> Versions:
> Apache 2.2.3
> mod_python 3.3.1
>
> this is the error message:
>
> [Thu Apr 12 18:44:04 2007] [error] make_obcallback: could not import
> mod_python.
> apache.\n
> ImportError: No module named mod_python.apache
> [Thu Apr 12 18:44:04 2007] [error] make_obcallback: Python path being
> used "['/u
> sr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/python2.4/plat-
> linux2', '/
> usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/
> local/lib/pyt
> hon2.4/site-packages', '/usr/lib/python2.4/site-packages', '/var/lib/
> python-supp
> ort/python2.4']".
> [Thu Apr 12 18:44:04 2007] [error] get_interpreter: no interpreter
> callback foun
> d.
>
> I had to install a bunch of things in my $HOME on the server, and
> obviously that path is not listed here.
> I saw a previous post suggesting that one should fix the path python
> is looking for modules. Unfortunately I don't have root access on the
> server and can't do that. So I tried to place an appropriate
>
> PythonPath "sys.path + ['/the/path/in/my/home']"
>
> directive in the apache config:
>
> 1. Within a <Location>
> 2. Directly after the LoadModule statement (ClearModules is not used)
> 3. In the server config area.
>
> None of these directives changes the python path used when I try to
> access the test location. Any suggestions what I'm doing wrong?
>
> Jochen
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list