Installed Python 3.1 but Terminal only picks up 2.5

Discussion in 'Mac Programming' started by cossie, Jan 9, 2010.

  1. cossie macrumors member

    Aug 8, 2006

    I installed the most recent version of Python on my MBP, I tried using the script that comes with the Python package "Update profile shell.command" and I've tried setting my PATH as:


    But each time I go open up a Terminal window and type 'python' I get:
    "Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)"

    Can anyone help me out? I've been spending a lot of time with Windows environments lately through work so I'm probably rusty with OS X, but I'd appreciate some help in setting up Python correctly.

  2. cossie thread starter macrumors member

    Aug 8, 2006
    I came up with a bit of a workaround, I've installed Eclipse, setup the PyDev plugin and set the 3.1 install as the interpreter for PyDev.
  3. chown33 macrumors 604

    Aug 9, 2009
    Instead of typing 'python' in a Terminal window, type (or copy and paste) the following two commands:
    echo "$PATH"
    which python
    Paste the output in a forum post.
  4. brainysmurf macrumors newbie

    Jan 10, 2010
    This is the default bahavior

    Since 3.1 is not backwards-compatible, to use 3.1 you have to type python3 in the terminal. If you want 2.5 then just type python (or you could type python2.5). If you try changing what typing python does, you could break Apple software, so don't even try it!
  5. cossie thread starter macrumors member

    Aug 8, 2006
    I tried 'python3' in the terminal and that gives me the latest version I installed, thanks for the explanation BrainySmurf :)
  6. wrldwzrd89 macrumors G5


    Jun 6, 2003
    Solon, OH
    Actually... there IS an officially supported way to make the default python in Terminal version 3, without breaking Apple software in the process. There's a little shell script that came with your Python download. Look in your Python 3.1 folder, inside Applications.

Share This Page