简体   繁体   中英

Python on Yosemite

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)?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM