0

On a Red Hat box, I upgraded Python from 2.3 to 2.6.4 and changed the symlink to python so when I type in python the 2.6.4 interpreter comes up.

However my .py file works from the command-line, but not in the browser. It seemed like a sys.path issue so I opened the file in a browser and printed out sys.path.

Surprisingly, my sys.path is different when called from a browser than when called from a command-line. Because the paths are all referring to 2.3, I believe Apache is picking up Python 2.3 rather than the new 2.6.4 version I installed.

How do I make Apache use Python 2.6.4 rather than 2.3? Both are installed.

2 Answers2

1

You're probably going to need to recompile mod_python. The better solution is to not use mod_python at all. Instead, run your Python applications as FastCGI which will provide you with a much more flexible platform in the long term.

rodjek
  • 3,355
0

I'd recommend to install the python2.6 and mod_python 2.6 packages from iuscommunity repository . They are very stable and reliable.

hdanniel
  • 4,363