Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Thomas Moore
.a{fill-rule:evenodd;}techdegree seal-36
Thomas Moore
Front End Web Development Techdegree Graduate 25,371 Points

How do I run Python 3.7.5 (installed with Homebrew) on MacBook that already has Python 3.7.3 (installed with Catalina)

Thanks in advance for any help you can provide.

I've installed Python3 on my MacBook using Homebrew. This is so I can access the latest version (3.7.5) for development.

However I've recently updated to Catalina, which already has Python3 installed (3.7.3).

The problem is, when I type "python3" into the Command Line, it starts the MacOS version of Python (3.7.3) not the latest version I've installed using Homebrew (3.7.5).

Is there a way I can make sure I'm always accessing my dev/Homebrew version of Python?

1 Answer

Here is something to try from Stack Overflow

/usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. This is an issue if you eg. brew installed Python.

Consider editing your .bash_profile to put: /usr/local/bin ahead of /usr/bin in your $PATH.

Edit that answer may no longer apply. But brew doctor and answers further down may help