Python not showing correct version on Mac OSX

Question:

I am trying to update Python to 3.7.4 on my Mac. Currently when I type python3 –version, it shows that I have Python 3.7.3 I have tried to update using just the standalone installer from the website as well as homebrew but even through all of these methods, python3 –version still returns to me 3.7.3. Even when I try to upgrade with Brew, it says that 3.7.4 is installed…

Picture for reference:

enter image description here

Please help and thank you in advance!

Asked By: kt-workflow

||

Answers:

Update: Check what python version you are using by running which python, at this point you might figure out what version of Python is being used to solve this problem. Otherwise, follow up this steps:

I would remove all Python installations and use Homebrew to install it.

First, run which python:

/Library/Frameworks/Python.framework/Versions/2.7/bin/python

Delete the entire Python.framework directory from /Library/Frameworks.

Second, run which python3:

/usr/local/bin/python3

Again, delete the entire python3 directory.

Now use brew doctor in order to see possible issues with symlinks. If you have issues run brew prune or brew cleanup --prune. This will remove all of the symlinks.

Reinstall python and python3 via homebrew:

brew install python
Answered By: lmiguelvargasf

Some older apps may count on the Python2.7 framework being installed. It sounds like you may not have your bash $PATH set to look for homebrew binaries before the built-in ones. You can edit your ~/.profile file, and make sure that /usr/local/bin is the first entry by adding the following line to the end of .profile:

export PATH=/usr/local/bin:$PATH
Answered By: Dylan McNamee
Answered By: Haaris Muhammed

Just type in the below and it’ll work

python3 –version

Answered By: Cyro