[ZODB-Dev] PYTHONHOME
Chris Withers
chrisw@nipltd.com
Wed, 04 Jul 2001 10:59:27 +0100
Hi,
What influence does the PYTHONHOME environment variable have over python and a
ZEO StorageServer?
I tried the following start script for the ZSS:
#! /bin/sh
INSTANCE_HOME=/usr/local/hosting/accounts/sds
export INSTANCE_HOME
cd $INSTANCE_HOME
PYTHONHOME=/usr/local/zope/2.4.0b2_base
export PYTHONHOME
STUPID_LOG_FILE=$INSTANCE_HOME/logs/sds.slog
export STUPID_LOG_FILE
ZEO_SERVER_PID=$INSTANCE_HOME/var/MAIN_ZEO_SERVER.pid
export ZEO_SERVER_PID
exec python2.1 $PYTHONHOME/lib/python/ZEO/start.py \
-h tachyon.nipltd.com\
-p 6969\
-u sds\
"$@"\
>/usr/local/hosting/accounts/sds/logs/zstdout.log 2>&1
But it kept failing with weird error messages:
Traceback (most recent call last):
File "/usr/local/zope/2.4.0b2_base/lib/python/ZEO/start.py", line 94, in ?
import sys, os, getopt, string
ImportError: No module named os
...until I removed PYTHONHOME from the script.
What was I doing wrong, what should I have been doing?
cheers,
Chris