Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm on a MacBook Pro with Mac OS 10.5.8. A few days ago I installed two versions of Python on my Mac (2.7.6 and 3.4.0; I first installed the latter but it didn't seem to work, so I installed the former). Immediately afterwards my Terminal stopped working. Now when I try to open a Terminal window, instead of a command line I immediately get the [Process completed] message. How can I get Terminal to work again so that I can access the command line? (Please be detailed as I'm fairly technically clueless. Thanks.)

ETA: I changed the "Shells open with" option in Terminal's Preferences to "/bin/bash", and now it works. Still, what happened? Why won't it work with the default /user/bin/login shell, and should I do anything about it?

share|improve this question

The installers for Python 2.x on OS X by default modify shell profiles (for the standard shells like bash and csh) to add its framework bin directory to the front of your shell path. Assuming you did not deselect the option during installation, there should now be the following in your .bash_profile file.

Setting PATH for Python 2.7

The orginal version is saved in .profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" export PATH

But this profile is only executed by default when you launch a new terminal window; it won't apply to existing terminal sessions. So make sure you open a new one and then try again. If you are using a different shell, you may need to modify that shell's startup to do the equivalent.

The installers for Python 3.x on OS X do not select the shell script modification option by default. You can enable it at installation or you can later run the Update Shell Profile.command file in the corresponding Python x.x folder in the Applications folder. Or you can just manually edit the right profile.

Refer to this post on Stack Overflow (Thanks to Ned Deily!) How to set default Python version in terminal on OS X 10.6.8

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .