0

Just got a new Mac with Yosemite. Ran the Migration Assistant to move files over from older machine. Now I find myself with an "old" (2.7.2) version of Python that doesn't work on Yosemite (crash at second line of interactive command line).

Either Apple ships Yosemite with a really old version of Python, or MA decided to overwrite the one that was there with an older one from my old machine?

Hoping that there is a way to solve this that doesn't involve multiple manual steps... but I haven't found an obvious way. Any Pythonistas out there that have a magic bullet for me?

Also - is this the right forum for this question or should I move it to Ask Different (apple.stackexchange.com)?

Floris
  • 45,857
  • 6
  • 70
  • 122
  • When I get a new mac, the first thing I do is go to activestate.com and download ActivePython. It's a simple install that gives you python and pip. – Bryan Oakley Dec 11 '14 at 18:19
  • As of Python 2.7.9 and Python 3.4.x, the python.org installers for OS X include pip as well. – Ned Deily Dec 11 '14 at 18:22
  • Floris, you undoubtedly had another version of Python installed, independent of the Apple-supplied system Pythons, which was migrated. If you used python.org installers, that Python would be in `/Library/Frameworks`. If you use a third-party package manager like MacPorts or Homebrew it is likely somewhere else. You can use `type python` to find out where you are picking up Python from and then either upgrade it or remove it. Do not try to remove the Apple Pythons in `/System/Library/Frameworks`. With Yosemite, Apple ships 2.7.6. – Ned Deily Dec 11 '14 at 18:26
  • @NedDeily Indeed, I had 2.7.2 on the (very) old machine. I found version 2.7.6 where you said it would be. Would the simplest thing be to remove the "other" python (apparently imported by MA) - what would be the right way to ensure that typing `python` at the command line gets me back to the right place? In other words - how do I uninstall 2.7.2? – Floris Dec 11 '14 at 19:16

1 Answers1

2

You undoubtedly had another version of Python installed, independent of the Apple-supplied system Pythons, which was migrated. If you used python.org installers, that Python would be in /Library/Frameworks. If you use a third-party package manager, like MacPorts or Homebrew, it is likely somewhere else. You can use type python to find out where you are picking up Python from and then either upgrade it or remove it. Do not try to remove the Apple Pythons in /System/Library/Frameworks. With Yosemite, Apple ships 2.7.6. You can either upgrade the additional Python, for example, by downloading and installing the latest Python 2 from python.org (currently 2.7.9), or follow the instructions here to remove it.

Community
  • 1
  • 1
Ned Deily
  • 83,389
  • 16
  • 128
  • 151