[Pythonmac-SIG] Python on OS X
Tracy Ruggles
trace@reinventnow.com
Sun, 9 Dec 2001 16:11:40 -0600
Hi,
I've been able to install Python on OS X with the pre-compiled version and
can use it interactively via the Terminal, but when I try to call it from
a CGI, I get a message I haven't seen before:
> Could not find platform independent libraries <prefix>
> Could not find platform dependent libraries <exec_prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
> File "/Library/WebServer/CGI-Executables/test.py", line 5, in ?
> import string
> ImportError: No module named string
> [Sun Dec 9 16:10:47 2001] [error] [client 127.0.0.1] Premature end of
script headers: /Library/WebServer/CGI-Executables/test.py
The first 4 lines of this error message happen every time. The module,
'string', doesn't seem to want to load. 'sys' and 'os' are there, but I
haven't tested for other ones.
The code calling it is:
> #!/usr/local/bin/python
>
> import string
> print "Content-type: text/html\n\n"
> print dir(string)
Does anybody have any idea what's happening?
Thanks,
Tracy
--
tracy s. ruggles -- trace@reinventnow.com