Steven Taschuk staschuk at
Wed Jul 30 19:21:52 CEST 2003

Quoth q:
> I have a Linux RH8.0 system. I installed Python2.2 from the 8.0 ISO
> updates. I installed the Tcl 8.3.3 from the Tcl site... I also
> installed the tcllib 1.0.
> My goal is to get viewcvs to run. However, when I check to see where
> the system thinks things are, the PYTHONPATH env var is blank.
> echo $PYTHONPATH --> produces nothing....
> So, can anyone tell me what it should say? [...]

This variable is analogous to $PATH; it lists directories in which
the Python import mechanism will search for modules.  The
interpreter supplements this list with some paths it knows itself;
for the complete result, launch the Python interpreter (by typing
'python' at your shell prompt) and type
    import sys

Unlike $JAVA_HOME, for example, $PYTHONPATH does *not* give the
path to the Python installation.

I don't know what viewcvs is, but a typical application does not
require any modification to $PYTHONPATH unless it is installed in
a weird place.  Normally Python modules get installed into, e.g.,
/usr/lib/python2.2/site-packages, which is among the directories
the interpreter uses automatically.

> [...] Can anyone shed any light
> as to how this var is populated, and why it might be blank....? [...]

It is populated like any shell variable.  It should be blank when
the interpreter's default paths are sufficient.

> [...] Can
> anyone suggest what file I need to alter/should modify to have this
> properly set whenever a user logs into the system....?

The obvious places are /etc/profile and ~/.bashrc, as appropriate.

... but none of this seems obviously relevant to your objective.
Is viewcvs not working?  If not, what is the problem?

Steven Taschuk                           staschuk at
"I'm always serious, never more so than when I'm being flippant."
                            -- _Look to Windward_, Iain M. Banks

More information about the Python-list mailing list