[mod_python] pythonpath

Jorey Bump list at joreybump.com
Mon Jan 31 09:12:36 EST 2005


Lionel Roubeyrie wrote:
> Hi all,
> I have a problem with the PYTHONPATH. I have to import in the web pages a 
> python module located in the topdirectory of where the web pages are stored.
> For that I modify the PythonPath directive, but now Apache2 gives a "Not Page 
> Found" error, and I have to demand three or four times the same url to 
> finally have the web page. I also try without the PythonPath directive and 
> set it in the /etc/profile or in the .bashrc of the Apache user, the same 
> problem returns.
> What can I do? 

You didn't provide enough details. Show us:

1. How you've configured mod_python (in httpd.conf or .htaccess)
2. How and where you've set the PYTHONPATH
3. The relevant parts of your importing module
4. The URL you are using
5. The relevant error entries in apache's error log

Don't bother with /etc/profile or .bashrc. Also, include a function in 
your module to display the path, so you can confirm it's being set.


More information about the Mod_python mailing list