Can't find user module despite setting PYTHONPATH
Paul Berkowitz
berkowit at silcom.com
Fri Nov 29 15:46:09 EST 2002
On 11/29/02 12:30 PM, in article BA0D0E7D.2749B%berkowit at silcom.com, "Paul
Berkowitz" <berkowit at silcom.com> wrote:
> OK. I discovered I'm not supposed to include the .py extension. So I removed
> it. It still doesn't work:
>
>>>> import module1
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ImportError: No module named module1
>
>
> But it's there, in my ~/Library/Scripts/Python/ directory. There must be
> something wrong with my PYTHONPATH?
>
> setenv PYTHONPATH
> .:/usr/lib/python2.2/:/Users/berkowit/Library/Scripts/Python/:/usr/lib/pytho
> n2.2/plat-darwin/ # all one line
>
> What?
Yes. If I cd to '/Users/berkowit/Library/Scripts/', then I can import the
module without problem. But otherwise PYTHONPATH doesn't seem to find that
directory. Does anyone know why not? (Mac OS 10.2.2, using tcsh in Terminal
to set PYTHONPATH).
--
Paul Berkowitz
More information about the Python-list
mailing list