Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #91489

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

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'subject:Python': 0.05; 'skip:/ 10': 0.07; 'directions': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'runtime': 0.09; 'subtle': 0.09; 'terminate.': 0.09; 'thread': 0.10; 'python': 0.11; 'python.': 0.11; '2.7': 0.13; 'files.': 0.13; 'up- to-date': 0.13; 'packages.': 0.15; "apple's": 0.16; 'earlier:': 0.16; 'fatal': 0.16; 'googled': 0.16; 'outdated': 0.16; 'py2app': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'skip:/ 70': 0.16; 'subject:Mac': 0.16; 'subject:after': 0.16; 'subject:install': 0.16; 'which,': 0.16; 'worse.': 0.16; 'wrote:': 0.16; 'resolved': 0.18; 'skip': 0.18; 'tend': 0.18; 'typing': 0.18; 'working.': 0.18; 'versions': 0.20; 'first,': 0.20; 'noted': 0.22; 'am,': 0.23; 'leave': 0.23; '2015': 0.23; 'third-party': 0.23; 'this:': 0.23; 'file.': 0.24; 'seems': 0.24; 'install': 0.25; 'header:User-Agent:1': 0.26; 'question': 0.26; 'header:X-Complaints-To:1': 0.26; 'linux': 0.26; 'not,': 0.27; 'skip:( 20': 0.28; 'appear': 0.29; '(it': 0.29; 'unlikely': 0.29; 'array': 0.29; 'certainly': 0.31; 'fri,': 0.31; 'code': 0.31; 'says': 0.32; 'framework': 0.32; 'choosing': 0.33; 'safely': 0.33; 'utility': 0.33; 'open': 0.33; 'message.': 0.34; 'could': 0.35; 'to:addr:python-list': 0.35; 'done': 0.35; 'easiest': 0.35; 'installing': 0.35; 'instance': 0.35; 'path': 0.35; 'really': 0.35; "isn't": 0.35; 'problem.': 0.35; 'but': 0.36; 'there': 0.36; 'possible': 0.36; '(and': 0.36; 'apple': 0.36; "let's": 0.36; 'stock': 0.36; 'so,': 0.37; 'two': 0.37; 'should': 0.37; 'operating': 0.37; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'received:org': 0.38; 'python.org': 0.38; 'files': 0.38; 'application': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'build': 0.40; 'sure': 0.40; 'subject:the': 0.40; 'some': 0.40; 'she': 0.61; 'skip:n 10': 0.63; 'results': 0.66; 'backup': 0.66; 'restore': 0.70; 'jul': 0.72; 'received:204': 0.75; 'article': 0.77; '2.7.1': 0.84; '4.2.1': 0.84; 'accurately': 0.84; 'located.': 0.84; 'python.org,': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Ned Deily <nad@acm.org>
Subject Re: Fixing Python install on the Mac after running 'CleanMyMac'
Date Fri, 29 May 2015 10:28:19 -0700
References <201505290347.t4T3lYjC006610@fido.openend.se> <201505290959.t4T9xpDK016524@fido.openend.se> <nad-6BFC76.09111729052015@news.gmane.org> <CANc-5Uy3Shm870E7G0tM2S64aX8MC_6jqzdZ0T3=KaRNiTZQCw@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 204.28.118.160
User-Agent MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.203.1432920531.5151.python-list@python.org> (permalink)
Lines 64
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1432920531 news.xs4all.nl 2900 [2001:888:2000:d::a6]:32829
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:91489

Show key headers only | View raw


In article 
<CANc-5Uy3Shm870E7G0tM2S64aX8MC_6jqzdZ0T3=KaRNiTZQCw@mail.gmail.com>,
 Skip Montanaro <skip.montanaro@gmail.com> wrote:

> On Fri, May 29, 2015 at 11:11 AM, Ned Deily <nad@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,
 nad@acm.org

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Fixing Python install on the Mac after running 'CleanMyMac' Ned Deily <nad@acm.org> - 2015-05-29 10:28 -0700

csiph-web