15-09-2021

  1. MacOS Catalina (released in 2019) still does not have Python 3 installed by default, only Python 2. Therefore, I needed a way to package the whole application into an app bundle and not make it dependent on user’s Python installation. There are several tools that help with that: py2app, briefcase, pyinstaller. I decided to use PyInstaller, it.
  2. I recently upgraded to macOS Catalina and it seems to come with Python 3.7.3. All of my packages have come from the PIP installed with Python 3.7.3. I have installed Python 3.7.7 (the newest vers.
Python Macos Catalina

I'm still working on getting pyenv in my bloodstream. It seems like totally the right tool for having different versions of Python available on macOS that don't suddenly break when you run brew upgrade periodically. But every thing I tried failed with an error similar to this:

I read through the Troubleshooting FAQ and the 'Common build problems' documentation. xcode was up to date and I had all the related brew packages upgraded. Nothing seemed to work.

Python Idle Macos Catalina

Until I saw this comment on an open pyenv issue: 'Unable to install any Python version on MacOS'

Bash has been the default shell on Macs since the early 2000s, but starting with Catalina, which Apple is due to publicly release this month, macOS is switching to Z Shell (aka, zsh). If you've already upgraded, then you'll need to modify.zshrc. Either of these config files will be in your user account's home directory, which has the alias. MacOS 10.15 (Catalina) now ships with Python3 but I would recommend installing a second version as not to “upset” the OS native shipped version. The book recommends Python 3.6.6 (at time of writing), I have based this post on Python 3.7.7 (I recommend not going to a higher version as Pygame Zero still has some install issues on the latest.

All I had to do was replace the 10.14 for 10.15 and now it finally worked here on Catalina 10.15. So, the magical line was this:

Python mac os catalina update

Hopefully, by blogging about it you'll find this from Googling and I'll remember the next time I need it because it did eat 2 hours of precious evening coding time.

Related posts

Python

Python Mac Os Catalina Version

Previous:
redirect-chain - Getting a comfortable insight input URL redirects history14 February 2020
Next:
How to install Node 12 on Ubuntu (Eoan Ermine) 19.1008 April 2020

Uninstall Python Macos Catalina

Related by category:
How much faster is Redis at storing a blob of JSON compared to PostgreSQL?28 September 2019Python
Best practice with retries with requests19 April 2017Python
Fastest way to find out if a file exists in S3 (with boto3)16 June 2017Python
Interesting float/int casting in Python25 April 2006Python
Fastest way to unzip a zip file in Python31 January 2018Python