May 29th, 2020

- Link toInstalling the latest version of Python on Mac OS Catalina and overriding the old default pre-installed versionpodcast on anchorfm
I finally did it. I successfully installed Python
version 3.7.7
viaHomebrew
on my Maclaptop with OS Catalina
installed.
Audioplayer is a cross platform Python 3 package for playing sounds (mp3, wav.). It provides the key features of an audio player, such as opening a media file, playing (loop/block), pausing, resuming, stopping, and setting the playback volume. In this video, I walk you through the process of installing Python 3 and properly setting it up so that it becomes the default instead of the System Python 2.
For those of you that still might be trying to figure outhow todo this, I will walk you through.
The reason why I was eager to make sure that I had the latest versioninstalled was because I am working on publishing (open-source)teaching-relateddocumentation
on Read The Docs
, and I need to havePython
installed in order to be able to install the programsnecessary to publish
there.
The default2.7.17
version of Python
was retired this pastJanuary 2020
. I had tried back then to replace it with Python 3+
,but was unsuccessful at the time. The following is what I did today:
First I updated Homebrew
. Yes, I used Homebrew
to (re)installPython
. It’s really easy. It’s just a matter of putting the pieces of thepuzzle together correctly!
It is recommended that you use pip = 8.0 together with setuptools = 0.8 to install gnureadline. This will download a binary wheel from PyPI if available, thereby bypassing the need for compilation and its slew of potential problems (especially on macOS). Use Python 3 as the macOS default. Python's website has a macOS Python 3 installer we can download and use. If we use the package installation, a python3 fill will be available in /usr/local/bin/. Aliasing is a must since the Python binary stored in /usr/bin/ can't be changed. What's nice about an alias is that it's specific to our command-line.

I ran the command
To updateHomebrew
. Then I ran the command
To (re)install Python
. Then I ran

To see which version of Python
my Mac laptop
was recognizing. Itstill recognized only Python 2.7.17
. So I ran the followingcommand
:
It told me the path
to my newly installedPython 3.7.7
. I had tochange the path
to Python
in order for my Mac
to recognize thenewly installed version. This is what the command brew info python
returned tome in Terminal:
So I had to add the following at the bottom of my .zshrc
fileto update the path
to my newly installed version of Python
viaHomebrew
:
Then I made sure to quitTerminal
and go back in so that the path
would actually be updated in a newTerminal
windowinstance.

Then I checked what version
of Python
was recognized now with
And this is what was returned:
Macos Catalina Python3.8
Success! It’s as easy as that.
And BTW, if you don’t know how to access your .zshrc
file in Catalina
,you simply execute the following command
:
Catalina Python3 Default
And your file will open in a new window. Then you can paste
At the bottom of the file.
I will be embedding this episode of Plugging in The Holes along with atranscript in the form of a post oninterglobalmedianetwork.com for yourhearing and reading pleasure. Bye for now!

Related Resources
Created by Maria D. Campbell who lives and works in New York City building useful things.You should follow her on Twitter. She also has a developer blogmariadcampbell.comyou may want to check out!
Comments are closed.