[Tutor] Python command calls the wrong version!

Evert Rol evert.rol at gmail.com
Wed Sep 8 08:38:29 CEST 2010

> Dear Python Tutors,
> I am new to Python, having perviously used IDL for all my scripts. I was hoping to use Python and so I have just downloaded and installed  version 2.6 using the mac installer. That all went fine.
> I then opened up X11, all fine.
> Then I typed in >python
> and got this message
> python: execv: /Applications/scisoft/i386/Packages/Python-2.5.4/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python: No such file or directory
> Waaaa!!! why is my python command trying to call a version which does not exist? I appear to have broken Python? I am sire this is a really easy thing to fix but I do not know enough about hows these programmes work to figure it out for myself.

Most likely your path has been screwed up by the installation of scisoft. From the fact that it now can't find this Python 2.5, it appears you've later removed scisoft, but never changed your path back (check your .bashrc (or .cshrc, depending on your shell).
Also check your PATH:
$> echo $PATH
and perhaps even
$> which python

to see what you get back. If that points to some awkwardly located python, there's your problem.

Btw, if you trying to replace IDL with Python (I assume RSI IDL), you may be better off using macports, because you'll want various Python libraries & modules on your Mac (eg numpy, scipy, matplotlib). And, in fact, you don't really need X11, although that may depend on the GUI toolkit you're using (TKinter works without, pygtk needs X11 & GTK, the latter also available through macports); you can use start Python from the Terminal.


More information about the Tutor mailing list