Re: Fixing Python install on the Mac after running 'CleanMyMac' (fwd)

2015-09-26 Thread Ned Deily
In article ,
 kacyjo...@lclark.edu wrote:
> I was having this same problem, entered those commands and got this as a 
> response:
> 
> MacBook-Pro:~ kacyjones$ /usr/bin/python2.7 -c 'import 
> numpy;print(numpy.__file__)' 
> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/num
> py/__init__.pyc
> MacBook-Pro:~ kacyjones$ 
> MacBook-Pro:~ kacyjones$ /usr/bin/python2.7 -c 'import 
> sys;print(sys.version)' 
> 2.7.10 (default, Jul 14 2015, 19:46:27) 
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
> 
> Any idea what that means for my system?

Since the original reply, Apple has updated the version of the OS X 
10.10.x system Python 2.7 to 2.7.10.  So that looks good.

-- 
 Ned Deily,
 n...@acm.org

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac' (fwd)

2015-09-20 Thread kacyjones
On Friday, May 29, 2015 at 12:56:49 PM UTC-7, Laura Creighton wrote:
> Good news, we are getting closer to understanding what to do.
> This in from Ned.  I will continue after the message:
> 
> --- Forwarded Message
> 
> Return-Path: <python-list-bounces+lac=openend...@python.org>
> From: Ned Deily <n...@acm.org>
> Subject: Re: Fixing Python install on the Mac after running 'CleanMyMac'
> Date: Fri, 29 May 2015 10:28:19 -0700
> Lines: 63
> 
> > Might that appear to work at first, but leave some subtle issues which are
> > not at first apparent? I don't know how intertwined Apple's Python instance
> > is in the day-to-day operation of the operating system (it certainly seems
> > to be on some Linux distros), but it's possible that some Apple-specific
> > package isn't available at part of the stock Python 2.7 distribution.
> 
> Installing a python.org Python (/usr/local/bin/python*) is independent 
> of and does not interfere with use of the Apple-supplied system Pythons 
> (/usr/bin/python*).  Apple does ship various third-party Python packages 
> ("distributions") with its system Python, like numpy, but they tend to 
> be old and outdated versions and there are a few Apple-only packages.  
> But, should that issue arise, that can be resolved by choosing the right 
> path (/usr/local/bin vs /usr/bin) or removing /usr/local/bin from $PATH.
> 
> The thing is the original message in this thread had this:
> > 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.
> 
> But ... I just did what I should have done earlier: googled for that 
> message.  And I find that the message is coming from a py2app-built 
> application (and it seems I answered the question 3 years ago!):
> 
> http://stackoverflow.com/questions/10184974/py2app-is-not-copying-the-pyt
> hon-framework-to-the-new-app-while-using-virutalenv
> 
> The py2app glue code could be looking for Pythons in various spots 
> including the system Python.  So, let's make sure the system Python is 
> still working.  On the most up-to-date 10.7 Lion system (10.7.5), typing 
> the following two commands should give results the same as those shown 
> (->):
> 
> /usr/bin/python2.7 -c 'import sys;print(sys.version)'
> - -> 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)]
> 
> /usr/bin/python2.7 -c 'import numpy;print(numpy.__file__)'
> - -> 
> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/pytho
> n/numpy/__init__.py
> 
> If not, then it really may be necessary to restore system files which, 
> as I noted before, is most safely and accurately done by following 
> Apple's directions to restore the system from the recovery partition and 
> a good backup of user files.
> 
> - -- 
>  Ned Deily,
>  n...@acm.org
> 
> - -- 
> https://mail.python.org/mailman/listinfo/python-list
> 
> --- End of Forwarded Message
> 
> So please type
> 
> /usr/bin/python2.7 -c 'import sys;print(sys.version)'
> 
> and tell me what you get as an answer.
> 
> Then type
> 
> /usr/bin/python2.7 -c 'import numpy;print(numpy.__file__)'
> 
> and again tell me what you get.
> 
> But if it isn't as Ned expects, then you may have to go back to
> your backups.
> 
> Laura


I was having this same problem, entered those commands and got this as a 
response:

MacBook-Pro:~ kacyjones$ /usr/bin/python2.7 -c 'import 
numpy;print(numpy.__file__)' 
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/__init__.pyc
MacBook-Pro:~ kacyjones$ 
MacBook-Pro:~ kacyjones$ /usr/bin/python2.7 -c 'import sys;print(sys.version)' 
2.7.10 (default, Jul 14 2015, 19:46:27) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]

Any idea what that means for my system?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Ned Deily
In article 201505290347.t4t3lyjc006...@fido.openend.se,
 Laura Creighton l...@openend.se wrote:
 webmas...@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?

It would be helpful to know what utility it is that is encountering the 
fatal error; that message is not familiar and I suspect it is coming 
from trying to run some third-party application.  It may be that the 
application was depending on a third-party framework installation of 
Python (in /Library/Frameworks rather than the system Python in 
/System/Library/Frameworks), such as provided by the python.org OS X 
installers, but without knowing more information, like what particular 
version of Python is needed, it would only be speculation.  Perhaps the 
best thing to do is to suggest the OP to participate directly here or an 
Apple users' forum like http://apple.stackexchange.com.

-- 
 Ned Deily,
 n...@acm.org

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Laura Creighton
In a message of Thu, 28 May 2015 23:07:42 -0700, Ned Deily writes:
It would be helpful to know what utility it is that is encountering the 
fatal error; that message is not familiar and I suspect it is coming 
from trying to run some third-party application.  It may be that the 
application was depending on a third-party framework installation of 
Python (in /Library/Frameworks rather than the system Python in 
/System/Library/Frameworks), such as provided by the python.org OS X 
installers, but without knowing more information, like what particular 
version of Python is needed, it would only be speculation.  Perhaps the 
best thing to do is to suggest the OP to participate directly here or an 
Apple users' forum like http://apple.stackexchange.com.

-- 
 Ned Deily,
 n...@acm.org

I asked her to come here, but I fear she is feeling a tad too
embarassed to do that right now.  I don't know how to find out
the name of the Utility -- the Error message really does say
'Utility' -- with no name for it.  Apparantly there is some log
file you can go take a look at to find out, but I don't know
what it is ...

Laura

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Cem Karan

On May 28, 2015, at 11:47 PM, Laura Creighton l...@openend.se wrote:

 webmas...@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?

Does she have a recent Time Machine backup that she can restore from?  
Otherwise the solutions are all fairly painful:

1) Install Python 2.7 from scratch (easy).  Then figure out where to put 
symlinks that point back to the install (mildly annoying/hard).  Note that 
Python 3 won't work; none of the built-in scripts expect it.

2) OS X recovery - 
http://www.macworld.co.uk/how-to/mac/how-reinstall-mac-os-x-using-internet-recovery-3593641/
 I've never had to do that, so I have no idea how easy/reliable it is.  I 
**think** its supposed to save all the data on the drive, but again, I've not 
done this, so I can't make any guarantees.

3) Wipe it clean and reinstall from scratch.

Honestly, I hope she has a time machine backup.  I've had to do recoveries a 
couple of times, and it can really save you.

Good luck,
Cem Karan
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread William Ray Wing

 On May 29, 2015, at 9:12 AM, Cem Karan cfkar...@gmail.com wrote:
 
 
 On May 28, 2015, at 11:47 PM, Laura Creighton l...@openend.se wrote:
 
 webmas...@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?

As a minor addendum - you can point out that “Clean My Mac” is a well-known 
piece of crap-ware that is so badly written as to be labeled by most people as 
malware.  Best possible solution would be a clean boot and restore from a 
recent clone (either CarbonCopy Cloner or SuperDuper) followed by a restore of 
intervening files from Time Machine.  Failing that, Cem’s suggestions are good.

-Bill

 
 Does she have a recent Time Machine backup that she can restore from?  
 Otherwise the solutions are all fairly painful:
 
 1) Install Python 2.7 from scratch (easy).  Then figure out where to put 
 symlinks that point back to the install (mildly annoying/hard).  Note that 
 Python 3 won't work; none of the built-in scripts expect it.
 
 2) OS X recovery - 
 http://www.macworld.co.uk/how-to/mac/how-reinstall-mac-os-x-using-internet-recovery-3593641/
  I've never had to do that, so I have no idea how easy/reliable it is.  I 
 **think** its supposed to save all the data on the drive, but again, I've not 
 done this, so I can't make any guarantees.
 
 3) Wipe it clean and reinstall from scratch.
 
 Honestly, I hope she has a time machine backup.  I've had to do recoveries a 
 couple of times, and it can really save you.
 
 Good luck,
 Cem Karan
 -- 
 https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Ned Deily
In article 201505290959.t4t9xpdk016...@fido.openend.se,
 Laura Creighton l...@openend.se wrote:
 I asked her to come here, but I fear she is feeling a tad too
 embarassed to do that right now.  I don't know how to find out
 the name of the Utility -- the Error message really does say
 'Utility' -- with no name for it.  Apparantly there is some log
 file you can go take a look at to find out, but I don't know
 what it is ...

Well, she could just download a current Python 2.7.x for OS X from 
python.org, install it, and see if that solves the problem.  That would 
be likely the easiest thing to do and is unlikely to make matters worse.  
If that doesn't work, restoring files from a backup would be in order, 
again most likely /Library/Frameworks/Python.framework/*.  As others 
have noted, running third-party apps like CleanMyMac is probably not a 
good idea, but, even if it is as crappy as its sounds, I would think it 
unlikely that it would be fooling with the Apple-supplied system Python 
in /System/Library/Frameworks.  If it did though, then the safest 
approach is to do a full Time Machine or other backup and restore the 
base system from the recovery partition and use the Migration Assistant 
to restore user files and settings from the backup.  But that's a very 
long and somewhat risky process so should only be done as a last resort.

https://support.apple.com/en-us/HT201314

-- 
 Ned Deily,
 n...@acm.org

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Skip Montanaro
On Fri, May 29, 2015 at 11:11 AM, Ned Deily n...@acm.org wrote:

 Well, she could just download a current Python 2.7.x for OS X from
 python.org, install it, and see if that solves the problem.  That would
 be likely the easiest thing to do and is unlikely to make matters worse.


Might that appear to work at first, but leave some subtle issues which are
not at first apparent? I don't know how intertwined Apple's Python instance
is in the day-to-day operation of the operating system (it certainly seems
to be on some Linux distros), but it's possible that some Apple-specific
package isn't available at part of the stock Python 2.7 distribution.

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Ned Deily
In article 
CANc-5Uy3Shm870E7G0tM2S64aX8MC_6jqzdZ0T3=karnitz...@mail.gmail.com,
 Skip Montanaro skip.montan...@gmail.com wrote:

 On Fri, May 29, 2015 at 11:11 AM, Ned Deily n...@acm.org wrote:
 
  Well, she could just download a current Python 2.7.x for OS X from
  python.org, install it, and see if that solves the problem.  That would
  be likely the easiest thing to do and is unlikely to make matters worse.
 
 
 Might that appear to work at first, but leave some subtle issues which are
 not at first apparent? I don't know how intertwined Apple's Python instance
 is in the day-to-day operation of the operating system (it certainly seems
 to be on some Linux distros), but it's possible that some Apple-specific
 package isn't available at part of the stock Python 2.7 distribution.

Installing a python.org Python (/usr/local/bin/python*) is independent 
of and does not interfere with use of the Apple-supplied system Pythons 
(/usr/bin/python*).  Apple does ship various third-party Python packages 
(distributions) with its system Python, like numpy, but they tend to 
be old and outdated versions and there are a few Apple-only packages.  
But, should that issue arise, that can be resolved by choosing the right 
path (/usr/local/bin vs /usr/bin) or removing /usr/local/bin from $PATH.

The thing is the original message in this thread had this:
 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.

But ... I just did what I should have done earlier: googled for that 
message.  And I find that the message is coming from a py2app-built 
application (and it seems I answered the question 3 years ago!):

http://stackoverflow.com/questions/10184974/py2app-is-not-copying-the-pyt
hon-framework-to-the-new-app-while-using-virutalenv

The py2app glue code could be looking for Pythons in various spots 
including the system Python.  So, let's make sure the system Python is 
still working.  On the most up-to-date 10.7 Lion system (10.7.5), typing 
the following two commands should give results the same as those shown 
(-):

/usr/bin/python2.7 -c 'import sys;print(sys.version)'
- 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)]

/usr/bin/python2.7 -c 'import numpy;print(numpy.__file__)'
- 
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/pytho
n/numpy/__init__.py

If not, then it really may be necessary to restore system files which, 
as I noted before, is most safely and accurately done by following 
Apple's directions to restore the system from the recovery partition and 
a good backup of user files.

-- 
 Ned Deily,
 n...@acm.org

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread MrJean1
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  wheel925 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:
 webmas...@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
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Ned Deily
In article bffd4736-f9ff-492e-9069-836f6e786...@googlegroups.com,
 MrJean1 mrje...@gmail.com wrote:
 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

For compatibility with applications linked on older OS X releases, Apple 
customarily ships more than one version of Python frameworks with OS X.  
There are actually three versions of the system Python frameworks there: 
you should see that Current is actually a symbolic link to 2.7.  All 
of those versions are shipped as part of OS X 10.7.

-- 
 Ned Deily,
 n...@acm.org

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread MrJean1
Correct, the Current version is just a link to 2.7.  Also, the binaries 
'/usr/bin/python{,w} seem to be copies of the 
/System/Library/.../Versions/2.7/bin/python{,w} files.

/Jean


On Friday, May 29, 2015 at 2:01:05 PM UTC-4, Ned Deily wrote:
 In article bffd4736-f9ff-492e-9069-836f6e786...@googlegroups.com,
  MrJean1 mrje...@gmail.com wrote:
  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
 
 For compatibility with applications linked on older OS X releases, Apple 
 customarily ships more than one version of Python frameworks with OS X.  
 There are actually three versions of the system Python frameworks there: 
 you should see that Current is actually a symbolic link to 2.7.  All 
 of those versions are shipped as part of OS X 10.7.
 
 -- 
  Ned Deily,
  n...@acm.org

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread random832
On Fri, May 29, 2015, at 12:11, Ned Deily wrote:
 As others 
 have noted, running third-party apps like CleanMyMac is probably not a 
 good idea, but, even if it is as crappy as its sounds, I would think it 
 unlikely that it would be fooling with the Apple-supplied system Python 
 in /System/Library/Frameworks. 

It sounds very likely to me. These cleaner apps are often designed to
remove unnecessary system components where the author doesn't know
what they are and doesn't think anyone needs them because his system
runs fine without it, along with the mistaken belief that these take up
a lot of space or that their existence slows down performance.

Looking at the version history of this page:
https://software.com/mac/utilities/cleanmymac/1.10.0

It looks like python is removed or otherwise messed-with by a module
called System Junk (earlier Development Junk).

Version 1.9.4 _claims_ that it fixed: Sytem Junk module reliability
improved and fixed issues with python applications. - but this is
basically an admission that it was messing with the sort of thing that
could cause these issues in the first place.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fixing Python install on the Mac after running 'CleanMyMac' (fwd)

2015-05-29 Thread Laura Creighton
Good news, we are getting closer to understanding what to do.
This in from Ned.  I will continue after the message:

--- Forwarded Message

Return-Path: python-list-bounces+lac=openend...@python.org
From: Ned Deily n...@acm.org
Subject: Re: Fixing Python install on the Mac after running 'CleanMyMac'
Date: Fri, 29 May 2015 10:28:19 -0700
Lines: 63

 Might that appear to work at first, but leave some subtle issues which are
 not at first apparent? I don't know how intertwined Apple's Python instance
 is in the day-to-day operation of the operating system (it certainly seems
 to be on some Linux distros), but it's possible that some Apple-specific
 package isn't available at part of the stock Python 2.7 distribution.

Installing a python.org Python (/usr/local/bin/python*) is independent 
of and does not interfere with use of the Apple-supplied system Pythons 
(/usr/bin/python*).  Apple does ship various third-party Python packages 
(distributions) with its system Python, like numpy, but they tend to 
be old and outdated versions and there are a few Apple-only packages.  
But, should that issue arise, that can be resolved by choosing the right 
path (/usr/local/bin vs /usr/bin) or removing /usr/local/bin from $PATH.

The thing is the original message in this thread had this:
 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.

But ... I just did what I should have done earlier: googled for that 
message.  And I find that the message is coming from a py2app-built 
application (and it seems I answered the question 3 years ago!):

http://stackoverflow.com/questions/10184974/py2app-is-not-copying-the-pyt
hon-framework-to-the-new-app-while-using-virutalenv

The py2app glue code could be looking for Pythons in various spots 
including the system Python.  So, let's make sure the system Python is 
still working.  On the most up-to-date 10.7 Lion system (10.7.5), typing 
the following two commands should give results the same as those shown 
(-):

/usr/bin/python2.7 -c 'import sys;print(sys.version)'
- - 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)]

/usr/bin/python2.7 -c 'import numpy;print(numpy.__file__)'
- - 
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/pytho
n/numpy/__init__.py

If not, then it really may be necessary to restore system files which, 
as I noted before, is most safely and accurately done by following 
Apple's directions to restore the system from the recovery partition and 
a good backup of user files.

- -- 
 Ned Deily,
 n...@acm.org

- -- 
https://mail.python.org/mailman/listinfo/python-list

--- End of Forwarded Message

So please type

/usr/bin/python2.7 -c 'import sys;print(sys.version)'

and tell me what you get as an answer.

Then type

/usr/bin/python2.7 -c 'import numpy;print(numpy.__file__)'

and again tell me what you get.

But if it isn't as Ned expects, then you may have to go back to
your backups.

Laura
-- 
https://mail.python.org/mailman/listinfo/python-list


Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-28 Thread Laura Creighton
webmas...@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


-- 
https://mail.python.org/mailman/listinfo/python-list