I'm trying to upgrade the version of python on my Mac using homebrew. I do brew install python3
and I see that it installs python 3.6.5. However, when I do python3 --version I get -bash: /Library/Frameworks/Python.framework/Versions/3.4/bin/python3: No such file or directory
. Not sure how I'm suppose to resolve this. Someone posted something similar (Unable to Run Python 3 After Homebrew Installation) but the solution is to download another version of python from the website, but I don't think this solves the fundamental issue of this lingering version. Any idea how I can resolve this?
Asked
Active
Viewed 231 times
1

U13-Forward
- 69,221
- 14
- 89
- 114

Brosef
- 2,945
- 6
- 34
- 69
-
This answer may have some insight for you: https://stackoverflow.com/questions/45649473/how-to-setup-python-path-for-2-7-on-mac – Turksarama May 30 '18 at 03:43
-
Sounds like you have an orphaned link in your path, what does `echo $PATH` give you? – juanpa.arrivillaga May 30 '18 at 03:56
-
@juanpa.arrivillaga I actually had `/Library/Frameworks/Python.framework/Versions/3.4/bin/python3` in my `$PATH`. I cleared the path, so now when I do python3 --version it says `python3: command not found` which is progress I guess. Still working on it. – Brosef May 30 '18 at 04:01
-
@Brosef yes, try adding the homebrew executable to your $PATH. I believe you want `/usr/local/opt/` based on the link posted by Turksarama. Apparently, homebrew doesn't do this automatically anymore. – juanpa.arrivillaga May 30 '18 at 04:06