Help! $PYTHONPATH trouble
Donn Cave
donn at u.washington.edu
Thu Aug 12 18:08:56 EDT 1999
Erik Stewart <possum at n-space.org> writes:
| The variable $PYTHONPATH doesn't seem to have any effect on my system (RH
| Linux 6.0, Python 1.5.1). Here's what I get after defining $PYTHONPATH:
|
| $ PYTHONPATH="home/possum/test/kwp"
| $ echo $PYTHONPATH
| home/possum/test/kwp
| $ python
You need to export the variable into the environment, or it's only a
shell variable that isn't inherited by python or other programs.
$ PYTHONPATH="home/possum/test/kwp"
> $ export PYTHONPATH
$ printenv PYTHONPATH
home/possum/test/kwp
$ python
Just to make it more confusing, if PYTHONPATH were already an environment
variable you wouldn't have had to export it, and there are several ways
to express that export, too: export NAME=val, NAME=val export NAME, etc.
Donn Cave, University Computing Services, University of Washington
donn at u.washington.edu
More information about the Python-list
mailing list