cgi question! problem with correct python version

Markus Jais info at mjais.de
Sun Dec 2 05:06:54 EST 2001


hello
I am using RedHat 7.1 and I have installed the old python 1.5.2 which seems 
to be needed by RedHat 7.1 and also the Python 2.1

now I have a strange problem.

1st script:
----
#!/usr/bin/env python
import sys
print sys.version
----
output:
2.1 (#1, Jun  4 2001, 12:55:45)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-81)]

when I have a CGI script like this:
----
#!/usr/bin/env python
import sys
print "Content-type: text/html\n\n"
print "<html><body>"
print sys.version, "<br>"
print "</html></body>"
----
output:
1.5.2 (#1, Mar 3 2001, 01:35:43) [GCC 2.96 20000731 (Red Hat Linux 7.1 2 

when I change the first line to
#!/usr/local/bin/python

then I get verison 2.1

can anybody tell me, why the apache is using the old version??
is there something wrong with the environment of apache???

markus













More information about the Python-list mailing list