0
votes

I have multiple versions of python installed on OSX yosemite. These all work like I want them to (i.e. I can use 2.7.10 instead of 3.4.x or the system 2.5.x).
I noticed that when I use kivy to run a .py file, I don't get any Warnings but I do get this:

[INFO   ] [Python      ] v2.7.6 (default, Sep  9 2014, 15:04:36)   

But when I start IDLE with the commands: python or kivy

Both of these commands start an IDLE prompt using 2.7.10
Should kivy be using the current Python version?

echo $PATH  

/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/subnetfile/android-sdk_r16-macosx/android-sdk-macosx/platform-tools/:/Users/subnetfile/android-sdk-macosx/android-sdk-macosx/platform-tools/:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

I am now wondering why I have all of the duplicate path entries...?
I can call Python with any of the following:

python            python2-32        python2.6         python2.7-config  pythonw2-32       pythonw2.7-32
python-32         python2-config    python2.6-config  pythonw           pythonw2.5        
python-config     python2.5         python2.7         pythonw-32        pythonw2.6        
python2           python2.5-config  python2.7-32      pythonw2          pythonw2.7    

But, as I said, when I call just "python" it brings up 2.7.10 as I want.
Is kivy just using an older version of Python?

1
How do you choose which python to run in the first paragraph (also the system python is not 2.5 it is 2.7.6 on Yosemite 10.10.3) and how did you install the pythons?mmmmmm
@Mark Just binary installers for 2.x, macports for 3.x. The system python used to be 2.5. I only have 2.3,2.5 as links and 2.6,2.7 in system/library/frameworks/python.framework/versions.fightermagethief
What is your path and how do you choose which python to runmmmmmm
@Mark see edit abovefightermagethief
I think you should sort out your path first :) I would stick to one way - macports or binary. That path will get python being 2.7.10mmmmmm

1 Answers

1
votes

The .kv files are associated with an .app bundle through the Finder. In this case Kivy.app

Running a GUI app has not idea of the PATH you have set in the bash startup scripts so only finds python on the paths that Apple set in the OS. In this case I think the app finds /usr/bin/python the system supplied python which is 2.7.6

The command line will use your path (which needs sorting out) and the first python it finds is the one in /Library which will be the 2.7 from python.org, currently latest is 2.7.10 (I assume the ivy script also finds this but I don't know its details)

Your path is set in the shell startup files see this answer for more details