[IPython-user] A bag of pythons on OS X leopard; Is a house cleaning in order.

Justin C. Walker justin@mac....
Wed Oct 8 01:17:41 CDT 2008

On Oct 7, 2008, at 19:11 , Gary Church wrote:

> This is more of a python related question rather than an ipython
> question but I hope you won't chastise me for asking it here :-)
> 1. How do I get python 2.6 to come up when I enter "python" at the
> terminal command line?

The package should tell you something about where it is installed, and  
maybe how to invoke it.  As a start, I would set your PATH variable so  
the path to the python 2.6 program is first:

    export PATH=/path/to/python:$PATH

where the python executable is "/path/to/python/python".

> 2. Should I "clean house" of all other pythons on the system and if
> so, how is that done?

I would minimize the number that you install.  Right now, I just have  
the sage pythons and the system's version.  I have installed MacPython  
in the past (2.3, 2.4, 2.5), but I don't have much left, so there may  
be an easy way to get rid of most of this one (how I got rid of them  
is buried in the dust in my attic :-}).

> 3. Do these other pythons interfere with each other in some way? Is it
> a problem having all these pythons slithering around on my system?

The sage python should not interfere.  Generally, it is built to be  
entirely self-contained.

You can run it using 'sage -python' or 'sage -ipython' (if you have  
'sage' in your PATH) or '$SAGE_ROOT/sage -xxx' (if not).

Your msg shows that you have Fink installed.  Which python version is  
in Fink (if any)?

Command-line use of python will be dictated by your environment; in  
particular, your PATH variable determines which version of python will  
be run, and if you have DYLD_* and LD_* variables in your environment,  
they should be set up to match your PATH variable.

Some problems can arise if you subsequently install packages which  
drop .py's in hard-wired locations.  One way to avoid it, once you  
understand how these variables work, is to set up environments for  
each that point only to the specific python's install points.

Feel free to ask for further clarification.


Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
If it weren't for carbon-14, I wouldn't date at all.

More information about the IPython-user mailing list