[ZODB-Dev] PYTHONHOME

Dunigan, Craig craig.dunigan@esker.com
Thu, 5 Jul 2001 10:39:24 -0500


FWIW, I recall reading somewhere that the environment variable PYTHONHOME
actually means something to Python 2, and the recommendation was to change
the name of that variable in the Zope startup script.

Craig Dunigan
Web Programmer
Esker Software - Extending the Reach of Information
mailto:craig.dunigan@esker.com
Ph. 608.273.6000
Fax 608.273.8227
http://www.esker.com

> -----Original Message-----
> From: Chris Withers [mailto:chrisw@nipltd.com]
> Sent: Wednesday, July 04, 2001 4:59 AM
> To: zodb-dev@zope.org
> Subject: [ZODB-Dev] PYTHONHOME
> 
> 
> 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
> 
> _______________________________________________
> For more information about ZODB, see the ZODB Wiki:
> http://www.zope.org/Wikis/ZODB/
> 
> ZODB-Dev mailing list  -  ZODB-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zodb-dev
>