3

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!

4
  • What does type python show? Commented Sep 16, 2019 at 23:42
  • I'm a Linux user, but check out what "python" actually points to. It's often a symlink that gets rearranged on installs. Because reasons, I have three different pythons installed ATM. Commented Sep 16, 2019 at 23:43
  • @kt-worflow, I hope my answers helps you, I have experienced some issues installing Python previously, and what I posted in my answered worked for me. Let me know if you have further problems. Commented Sep 16, 2019 at 23:43
  • Try which -a python to see all the Pythons available on your path. python --version just runs the first one that is found. Commented Sep 16, 2019 at 23:58

4 Answers 4

7

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 
Sign up to request clarification or add additional context in comments.

4 Comments

I can't remove anything from those directories, as it says it's required by Mac OS.
@kt-workflow, what if you run sudo rm /Library/Frameworks/
Hi miguel, your comment helped. When I ran 'which python', I was able to find out that it was stored in miniconda3, which was running 3.7.3. All I had to do was delete that path. Thank you for your help!!
@kt-workflow, you're welcome. I glad I could help you.
1

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 

Comments

0

ln -s -f /usr/local/bin/python /usr/local/bin/python

https://dev.to/malwarebo/how-to-set-python3-as-a-default-python-version-on-mac-4jjf

2 Comments

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
0

Just type in the below and it'll work

python3 --version

1 Comment

This doesn't actually answer the question in any way. The question is not about how to show your current python-version, but how to upgrade it to another one.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.