[mod_python] mod_python installation on Ubuntu

Normand Savard nsavard at mapgears.com
Fri Jun 26 14:27:39 EDT 2009


Normand Savard wrote:
> I'm trying to make mod_python works in a non traditional environment, 
> mainly in the FGS environment (http://www.maptools.org/fgs/).  I built 
> the mod_python 3.3.1 with Apache 2.2.11.  The configure switches are:
>
> ./configure --prefix=$FGS_DEV_HOME/built/mod_python \
>    --with-apxs=$FGS_DEV_HOME/built/apache/bin/apxs \
>    --with-python=$FGS_DEV_HOME/built/python/bin/python
>
> I have no .htaccess file.
>
> When I run python on the command line and try and import mod_python, I 
> got:
>
> nsavard at Manie:~/fgspython$ python
> Python 2.6.2 (r262:71600, May 25 2009, 17:09:05)
> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import mod_python.apache
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File 
> "/home/nsavard/fgspython/lib/python2.6/site-packages/mod_python/apache.py", 
> line 30, in <module>
>    import _apache
> ImportError: No module named _apache
>
>
> It means that mod_python is installed based on what I read on the 
> mailing list.  If I access mptest.py through the browser, the script 
> doesn't run and outputs the error that I pasted below.  I did read 
> most of what I found on Google but still searching.
>
> Does someone have any idea of what is happening?
>
All,

Replying to myself.  This was a build error.  I built mod_python against 
python 2.5.2 first, then I updated python to 2.6.2 and rebuilt 
mod_python.  For some reasons some mod_python libraries were not 
rebuilt.  After I did "make clean" and rebuilt, everything went smoothly.

Thanks.

Norm







More information about the Mod_python mailing list