Setting Environment Variables

Ben Ocean lists at
Sat Dec 23 08:30:24 EST 2000

Thanks. I did as you suggested, adding the path to my *webmaster* account,
but it's not part of the sys.path, which (I presume) is what I want and

thor:/home/webmaster# python
Python 2.0 (#1, Oct 16 2000, 18:10:03)
[GCC 2.95.2 19991024 (release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/local/lib/python2.0', '/usr/local/lib/python2.0/plat-linux2',
'/usr/local/lib/python2.0/lib-tk', '/usr/local/lib/python2.0/lib-dynload',

Please advise.

-----Original Message-----
From: python-list-admin at
[mailto:python-list-admin at]On Behalf Of David Porter
Sent: Saturday, December 23, 2000 4:18 AM
To: Python List
Subject: Re: Setting Environment Variables

* Ben Ocean <beno at>:

> I'm trying to set environment variables so I can define my own path for my
> modules. My problem is I don't know where to set the PYTHONPATH. My book
> says do it in the .cshrc file: where the heck's that? My Linux book says
> should be in the /home directory, but it isn't. I own this server and it's
> standard RedHat 6.2 install. Please advise.

What is your shell? It is probably bash. if so, add something like this to

export PYTHONPATH=/path/to/modules

If adding more than one path put a colon between them.



More information about the Python-list mailing list