[Tutor] ipython, PYTHONPATH, on a MAC

Michael Fourman Michael.Fourman at ed.ac.uk
Tue Feb 16 17:03:30 CET 2010


If you start Python from command line you can just use usual bash methods

put


PYTHONPATH= xxx

in ~/.profile

or for use in a single shell

export PYTHONPATH=xxx

If you start Python from a dbl-clickable application you need to get the PYTHONPATH into the application's environment

See

http://mactip.blogspot.com/2004/04/setting-environment-variables.html

Hope this helps,

michael


On 16 Feb 2010, at 15:46, John [H2O] wrote:

> 
> Hello,
> 
> I'm not a Mac user, but I'm a promoter of Python! I have a good friend using
> a Mac who's becoming sceptical of python due to frustrations with the
> PYTHONPATH. I'm trying to help...
> 
> Everything is fine running vanilla python. Importing modules works fine. But
> in ipython, the module paths need to be appended individually. I can't even
> set a module directory into which ipython will look recursively for modules.
> 
> There is nothing custom set in .ipython/ipythonrc or ipy_user_conf.py
> 
> The PYTHONPATH variable doesn't need to be set using vanilla python. The
> path settings are set somehow, however (I can see this from import sys;
> sys.path). I'm not sure where this is all happening.
> 
> Any ideas on the best way to set the PYTHONPATH for a mac?
> 
> Thanks!
> -- 
> View this message in context: http://old.nabble.com/ipython%2C-PYTHONPATH%2C-on-a-MAC-tp27610302p27610302.html
> Sent from the Python - tutor mailing list archive at Nabble.com.
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
> 

Professor Michael Fourman FBCS CITP
Director, iDEA lab
Informatics Forum
10 Crichton Street
Edinburgh
EH8 9AB 
http://idea.ed.ac.uk/
twitter @iDEAatEd
For diary appointments contact :
mdunlop2(at)ed-dot-ac-dot-uk
+44 131 650 2690

The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.



More information about the Tutor mailing list