packages do not have hardcoded paths in them.
in previously releases, I copied the python pkgs supplied by EigenLabs (installed to the EigenD sub directories), into the system framework (/system/library) and machine framework (/library) and had no issue.
anyway this is not relevant, as we are not using any python packages for a while now.
(they were only really used for the python based UIs, eigencommander/eigenbrowser)
indeed apple provided pip3, but its unclear where it installs too.
anyway, I think Ive answered my own question
I’ve a feeling, I was wrong… NO python is installed with the base macOS installed anymore.
it only comes with Xcode !
I was confused as I assumed usr/bin/python3, not being within Xcode, would mean its base install.
but that appears to be false…
>>> import sys
>>> print (sys.path)
['', '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python38.zip', '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8', '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/lib-dynload', '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages']
we can clearly see here that the python3 is using the Xcode supplied framework.
so, there is a dependancy there.
I can’t tell for sure, as I (unfortunately) have Xcode on all my macs,
but Id assume this means /usr/bin/python3 is installed as part of Xcode (or its command line equivalent) , along with the framework.
anyway, doesn’t really matter, this just supports my decision to go with an install from python.org.
this will be a system wide install… Im not going to start messing with an application (EigenD) having its own version… I’m sure that python has adequate ways (site packages etc) of handling different application requirements on a single machine…
whilst this kind of ‘anti social’ behaviour is common on windows, things like Linux regularly share common frameworks… and software is built to cope with it, so Id assume this is true with something as successful/widely used as Python
(and I dont want to get into speculation of Eigenlabs motives, as we dont have them on hand to explain/discuss their approach )
update: ok, even more info
perhaps /usr/bin/python3 is there in base install, but really is ‘bare bones’
for two reason
a) its not any kind of symbolic link to the python3 in Xcode, its a full binary file.
and actually on my machine, whilst the same version python source is used … its clearly a different build.
(different size and date)
b) sitepackages reveal an interesting path… (compared to sys.path)
['/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages', '/Applications/Xcode.app/Contents/Developer/AppleInternal/Library/Python/3.8/site-packages', '/Library/Python/3.8/site-packages', '/AppleInternal/Library/Python/3.8/site-packages', '/AppleInternal/Tests/Python/3.8']
its still primarily dependent on Xcode, but also interestingly, it has
interesting, because this directory does not even exist.
so this leads me to some ideas on how apple intended this to be used.
basically this a more standard unix python install, rather than macOS approach (with frameworks)
/usr/bin/python3 was there to give some ‘compatibility’, without needing an Xcode install but likely mainly just for light scripting. if you wanted to add packages you were expected to add in /Library/Python/3.8/site-packages.
this contrasts with ‘3rd party’ python installs (e.g. python.org) , that will install as frameworks
Python 3.10.5 (v3.10.5:f377153967, Jun 6 2022, 12:36:10) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import site
so ironically, Apple are now taking an approach closer to unix, whilst python.org are still using the more ‘apple like’ approach of frameworks.
this is actually ‘useful’ as it means there are less likely to be clashes.
users should be careful though …
installing python seems to change the default zsh path (.zprofile) , so you’ll default to the python.org version.
all that said, I think Apple arent really using python for the system at all, so its really not going to matter.
phew - makes me glad to install from python.org, as I think otherwise, users pythons setups on macOS are going to be quite different… and I bet its even worst on windows