-1

Its usually not recommended to update a system package (such as python) on macOS.

However, I have been asked to upgrade to test something.

So now the question is - how hard it is to update python on (not so recent) macOS? And is there an easy way of doing it?

  • Why not ask how to execute your test? This may be an XY problem or just that it doesn’t show your research per How to Ask - meta.stackexchange.com/questions/66377/what-is-the-xy-problem – bmike Jul 27 at 3:50
  • @bmike, not sure what you mean. I know how to run the program, but it has glitches. So I want to make sure they appear indepent of python/library version program depends on. – Igor Jul 27 at 12:16
  • Aah - so you’re asking how to set up virtual environments to test different python versions without worrying what version Apple installed? – bmike Jul 27 at 12:28
  • 1
    @bmike, I had no idea what virtual environment is? Are you taking sandbox? VM? I know very little about OSX as I am C++ developer (mostly). – Igor Jul 27 at 12:54
  • I may find some time to show you virtual environments - they are built in to python and very powerful to isolate / test / control exactly which version of library and package and code run. None of it is macOS specific, but python can be used very well on macOS without ever touching the version Apple installs - that version is for Apple and you can roll your own easily and with great control. – bmike Jul 27 at 15:19
2

Another option is to use the Anaconda distribution of Python3. This along with Anaconda will provide you with Python 3.8. Python should be run in virtual environments and these are simple to manage in Anaconda. Anaconda comes with several data analysis tools if you are interested in that.

| improve this answer | |
1

You can easily install any new version of python you wish; and you cannot remove the system python.

macOS traditionally comes with python2. You can install a newer version of python2, and choose whether you use the system python or the newer version by how you call it, or by the first line of your script. Using /usr/bin/python will use the system python, necessary for compatability; and using /usr/bin/env python will use the newer installed python.

You can install python3, and then call it using python3.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .