Python For Macos Catalina

Posted on  by 

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. This is for macOS Catalina. MacOS comes pre-installed with Python but on Catalina, this is version 2.7 which has reached the end of its life. This will create a few hiccups in the process but let’s start with the basics. As Apple has announced, Mac OS Catalina now runs under its own read only file system: macOS Catalina runs on a dedicated, read-only system volume called Macintosh HD. This volume is completely separate from all other data to help prevent the accidental overwriting of critical operating system files. 1 Sounds great.

Python 3.8 macos catalinaPython For Macos CatalinaPython for mac catalina

At some point in the beta program of macOS Catalina Homebrew’s python 3 broke and only ended up showing an “Abort trap: 6” for every command that involved using it. This included pip3 and other tools that were previously downloaded and worked as expected.

After a bit of searching I found hints that there was an issue with some OpenSSL libraries. Using the current openssl package, Homebrew has openssl@1.1, there’s a simple fix (exact command might differ once the package gets updated) for the problem:

ln -s /usr/local/Cellar/openssl@1.1/1.1.1d/lib/libcrypto.dylib /usr/local/lib/libcrypto.dylib
ln -s /usr/local/Cellar/openssl@1.1/1.1.1d/lib/libssl.dylib /usr/local/lib/libssl.dylib

Python For Mac Os Catalina Update

Python

Python For Mac Os Catalina Os

This will take care of it until openssl gets updated and the symlinks eventually break. I’m sure I’ll have to get back here to remind myself on how this gets fixed in the future.

Coments are closed