Fixing Python install on the Mac after running 'CleanMyMac'
MrJean1
MrJean1 at gmail.com
Fri May 29 13:50:37 EDT 2015
FWIW, I recently upgraded an older MacBook to Mac OS X 10.7.5 and there are 3 different versions of Python in /System/Library/Frameworks/Python.framework, see:
$ ls /System/Library/Frameworks/Python.framework/Versions/
2.5 2.6 2.7 Current
It is unclear whether MacOS X 10.7.5 installed all four of these Python versions. The older one(s) may be left over from the previous MacOS X release on the machine. But all are Apple builds of the Python version, for example:
$ python2.7
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ^D
In addition, there is a link in /usr/bin to the python2.X, pythonw2.X and python2.X-config file for each version, see
$ ls -la /usr/bin/python*
-rwxr-xr-x 2 root wheel 62752 May 21 19:06 /usr/bin/python
-rwxr-xr-x 6 root wheel 925 May 21 19:06 /usr/bin/python-config
lrwxr-xr-x 1 root wheel 75 May 21 19:06 /usr/bin/python2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5
lrwxr-xr-x 1 root wheel 82 May 21 19:06 /usr/bin/python2.5-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5-config
lrwxr-xr-x 1 root wheel 75 May 21 19:06 /usr/bin/python2.6 -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6
lrwxr-xr-x 1 root wheel 82 May 21 19:06 /usr/bin/python2.6-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6-config
lrwxr-xr-x 1 root wheel 75 May 21 19:06 /usr/bin/python2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
lrwxr-xr-x 1 root wheel 82 May 21 19:06 /usr/bin/python2.7-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
-rwxr-xr-x 2 root wheel 62752 May 21 19:06 /usr/bin/pythonw
lrwxr-xr-x 1 root wheel 76 May 21 19:06 /usr/bin/pythonw2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/pythonw2.5
lrwxr-xr-x 1 root wheel 76 May 21 19:06 /usr/bin/pythonw2.6 -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/pythonw2.6
lrwxr-xr-x 1 root wheel 76 May 21 19:06 /usr/bin/pythonw2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7
Perhaps you can reinstall these Pythons from the CD which came with the Mac. Let me know if you need more info.
/Jean
On Thursday, May 28, 2015 at 11:47:52 PM UTC-4, Laura Creighton wrote:
> webmaster at python.org just got some mail from some poor embarrased
> soul who ran this program and broke their Python install.
>
> They are running Mac OSX 10.7.5
>
> They are getting:
>
> Utility has encountered a fatal error, and will now terminate. A
> Python runtime could not be located. You may need to install a
> framework build of Python or edit the PyRuntimeLocations array in this
> applications info.plist file. Then there are two oblong circles. One
> says Open Console. The other says Terminate.
>
> So https://docs.python.org/2/using/mac.html says:
>
> The Apple-provided build of Python is installed in
> /System/Library/Frameworks/Python.framework and /usr/bin/python,
> respectively. You should never modify or delete these, as they are
> Apple-controlled and are used by Apple- or third-party software.
>
> So, I assume this poor soul has done precisely that.
>
> What do I tell her to do now?
>
> Laura
More information about the Python-list
mailing list