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

2

Thanks in advance for any help you can provide.

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

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

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

Is there any way I can make sure I'm always accessing my dev/Homebrew version of Python, when I input a command like "python3" or "pip3" into the Terminal?

I'm just concerned that when I then install other packages (e.g. pip3 install pipenv and then pipenv install django==2.2.0) they (pipenv and django) won't be installed alongside my homebrew version of Python (3.7.5) but will instead be installed with the native macOS version of Python (3.7.3).

I'm still learning all this, but wouldn't it cause a couple of issues:

  • Everything starts getting out of sync - especially if macOS stays on 3.7.3 for a long time
  • It could cause bugs if some Python/Django packages I install exclusively through Homebrew expect 3.7.5, but the Python my machine is running is in fact 3.7.3.

FunkyChicken

Posted 2019-11-13T19:13:44.090

Reputation: 21

No answers