[mod_python] 'import site' failed

Martin Sandin msandin at hotmail.com
Thu Jan 18 08:08:53 EST 2001


Hello!

I'm trying to get mod_python up running and have run into the same problem
on both Win98 systems I've attempted this feat on. This after following the
instruction provided to the best of my abilities. Apache starts giving the
following message:

'import site' failed; use -v for traceback
Apache/1.3.12 (Win32) mod_python/2.6.3 Python/2.0 running...
'import site' failed; use -v for traceback

and then returning "internal server error" on the URLs pointing to Python
files. I've tracked dow that error message as something that
Python emitts. Thus given I'll ask this:

What does that error message mean? What has gone wrong? How can I fix it in
general? And if anyone knows, how can it be fixed in this particular case?



Configuration is as follows:

Apache 1.3.12 installed in c:\program\servers\apache\

mod_python.dll (for Python2.0) in the modules\ directory


In the httpd.conf file I've got the following lines where appropriate:

LoadModule python_module modules/mod_python.dll

DocumentRoot "C:/Data/Httpserver"

<Directory "C:/Data/Httpserver/python/">
AddHandler python-program .py
PythonHandler test
PythonDebug on
</Directory>


Python (2.0) itself resides in
C:\dev\Python20
which is also in the PATH. No PYPATH variable exists.

The mod_python directory, as extracted from the distribution located in
either of these (I've tried a bunch due to mod_pythons installation
instructions not being up to sync with the dist. archive)
C:\dev\Python20\mod_python\
C:\dev\Python20\lib\mod_python\
C:\dev\Python20\lib\python\mod_python\
C:\dev\Python20\lib\mod_python\python\mod_python\
etc.

The mod_python-2.6.4 directory has been similarly moved around (does it
matter at all?).


As a last piece of information, on the other machine I tried I used the
exact same (save some paths) configuration but with the latest (as of this
morning) versions of mod_python and Apache. The exact same problem.

THanks:-)


-
Martin Sandin
come.to/vague

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.modpython.org/pipermail/mod_python/attachments/20010118/0925d74b/attachment-0003.htm


More information about the Mod_python mailing list