[Pythonmac-SIG] import question

Scott Frankel leknarf at pacbell.net
Thu Nov 6 13:48:52 EST 2003


Apologies in advance if this is so simple as to be OT ...

How should I setup the PYTHONPATH var on OSX so that I can
import a module I've built to another script?

i.e.:
I've built a module and installed it in /usr/local/my_stuff/py_modules
I've set the PYTHONPATH environment var in my 
~/Library/init/tcsh/rc.mine
	setenv PYTHONPATH /usr/local/my_stuff/py_modules
Then sourced rc.mine.

 From my script, I get an "ImportError: no module named foo" from this
	import foo
which exists and is executable in /usr/local/my_stuff/py_modules.

Thanks in advance!
Scott




More information about the Pythonmac-SIG mailing list