[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scripts on OSX 10.11

From: Floris van Manen
Subject: scripts on OSX 10.11
Date: Thu, 25 Feb 2016 22:50:23 +0100

the thing is that some of the scripts in the bin folder have python set to
I merely copied it to other scripts to get them going for the time.

I do agree that it would be more convenient to have the scripts use the python 
version which is included in the distro.
Not sure how to set that working from a shell script however.
e.g. if you run that python, there is no working environment either…

$ /Applications/
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named os


> On 25 Feb 2016, at 22:32, David Wright <address@hidden> wrote:
> That would indicate that, as far as the system is concerned, python
> is (a link to) python2. Good, your system (unless it's archlinux)
> probably isn't broken. You've only broken your part of it.
> If you work through other people's scripts changing #!/usr/bin/env python
> to #!/usr/bin/python you are storing up more and more problems in the
> future. If you really want to stick with a PATH default of python3,
> then look at each script you feel the need to change. If it's
> written in python2, you can fairly safely changed the shebang to
> #!/usr/bin/env python2
> which should run the correct version. The possible dangers if these
> are system scripts are that the file's timestamp is changed as are the
> contents. This could interfere with how their upgrade scripts function
> if they depend on these.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

reply via email to

[Prev in Thread] Current Thread [Next in Thread]