[mod_python] NIGHTMARE Installing mod_python on windows

Thomas Wardill tom at howrandom.net
Wed May 4 15:28:03 EDT 2005




On 4/5/05 6:10 pm, "py pan" <python.pan at gmail.com> wrote:

> Does mod_pyhton stop supporting windows ?
> 
> I'm trying to install it on windows, which is supporsed to be a
> trivial task. But it's not.
> 
> ---
> 
> First I searched the doc about installation in current version of mp,
> and was surprised to find that the official documentation of mp
> doesn't even have a section for installation in Windows !!.
> 
> ---
> 
> Then I searched the net and found some info, which said that what's
> required is a mod_python.dll and need to copy some folder(s) manually
> into the pythonx.x\Lib.
> 
> I looked for mod_python.dll but couldn't find it. I figured that this
> approach is for the older version of mod_python so I didn't go along.
> 
> ---
> 
> Then I searched the net, and found so-called "mod_python window installer":
> http://www.lehuen.com/nicolas/download/mod_python/
> 
> There are two files in that folder currently:
> mod_python-3.1.3.win32-py2.3.exe
> mod_python-3.2.0-dev-20050428.win32-py2.4.exe
>  
> I tried the first one, which seems to install nicely. But when I tried
> it in python:
> 
>>>> from mod_python import apache
> Traceback (most recent call last):
>  File "<interactive input>", line 1, in ?
>  File "C:\Python24\Lib\site-packages\mod_python\apache.py", line 28, in ?
>    import _apache
> ImportError: No module named _apache
> 
> I went to check the installed mp in
> c:\python2.4\Lib\site-packages\mod_python, and found that there's no
> _apache there. What also surprised me is that there's no subfolders in
> that folder.
> 
> ---
>  
> I tried the second file
> (mod_python-3.2.0-dev-20050428.win32-py2.4.exe) and got the same
> error.
> 
> ---
> 
> So, what's the deal here ? mod_python gave up the windows users or what ?
> 
> 
> pan
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

Your problem lies with the fact that you are trying to import apache from
the console, this doesn't work, and will generate the "can't find module
_apache" message that you received.

The fact that you get that far would suggest that mod_python is successfully
installed, and you should start attempting to use it from apache.

See the documentation for how to set this up, including the necessary
changes to apapche.conf or writing a .htaccess file to use mod_python. The
documentation also includes a sample "hello world" program that should get
you started.

Hope this helps
--
Tom Wardill





More information about the Mod_python mailing list