I'm trying to set up Review Board, which uses Django, on WinXP with Apache 2.2 and mod-python.

I have a default Python install, but I want to use a different instance. The default is c:/python25, but I want d:/xxx/python25. mod-python has a config option to change the path, but I don't want to have to recompile mod_python (as the code is in VCS and could be put anywhere). How can I fix this?

Currently I'm trying to change the environment path using SetEnv in the Apache conf file, e.g.

SetEnv PATH "d:/xxx/python25;PATH"
LoadModule python_module modules/mod_python.so

I.e. setting the environment variable before mod-python is loaded as this is where it finds the Python interpretter.

This doesn't seem to work. Is the syntax wrong? Is there another solution?

Thanks.

Accepted Answer

If you're on windows, it's possible it's referencing the registry for the path. Try looking in the registry under:

HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.5

In particular, the subkeys, InstallPath, Modules, and PythonPath.

Written by ars
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki