Need Help Re:PATH

Snoopy :-)) genius at idirect.com
Mon Mar 20 17:04:02 EST 2000


Thanks for the help Greg. I couldn't reply
earlier since I was away
and just saw your message about an hour ago. 

Both you and Randall sure made my day. Since I
finally got it. My mistake
was not placing the "export" before the
PYTHONPATH in the
".bash_profile".
What caused me to make this mistake was, In
the "bash_profile" I
observed the default entry regarding the
"PATH" variable and the
"export" is not placed before so I assumed,
that it shouldn't be placed
before the "PYTHONPATH" either.

Regarding your reference to the ~/.bashrc.  I
did look it this as well;
but the comments seem to indicate, that the
PATH variables should be
placed in the ~/.bash_profile. Anyway
everything seem to be working
finally.  I sure have a long way to go yet,
both in Linux as well as in
Python.  Thanks again for everything.
Best regards
Charles
greg Landrum wrote:
> 
> "Snoopy :-))" wrote:
> > >     export PYTHONPATH=/home/charly/Pydir    <-- If not, just do this
> > >     python
> > >     >>> import mymodule
> >
> > I did the above and it seem to work.  However it is only effective while I am logged in.  If
> > I loggout and log back again I have to use the above in order for things to work.  This is
> > confirmed by one of the Linux Books which states that this is a temporaary solution.  The
> > book say that in order to make it permanent  the
> > "PYTHONPATH=$PYTHONPATH:.:/home/charly/Pydir "  should be placed in the
> > "/home/charly/.bash_profile"  file.
> 
> Assuming that .bash_profile is the correct name of the file (I always used
> .bashrc),
> you are almost there.  As Randall said, you need to do:
> export PYTHONPATH=$PYTHONPATH:.:/home/charly/Pydir
> in that file.  Notice the "export" bit, it's important.
> 
> If this does not work, make sure that your .bash_profile is actually
> getting read.
> You can do this by adding:
> echo "Hi Charly"
> at the bottom.  If you do not see this message when you log in or start a
> new shell,
> then that file is probably not being read.
> 
> > answer.  Purhaps if I bug people in these groups  long enough,some one will  help me see the
> > light.  I sure would appreciate it.
> 
> I wouldn't advise using bugging people as an strategy for getting answers.
> 
> I hope this helps,
> -greg
> 
> --
> 
> greg Landrum (greglandrum at earthlink.net)
> Software Carpenter/Computational Chemist



More information about the Python-list mailing list