This morning, I attempted to uninstall both versions of python3 that I had on my system. 3.7.something and 3.6.5_1. After reinstalling using brew, I attempted to use brew switch python 3.6.5_1
. All seems well but when I launch python using python3
, it launches python 3.7.2 (which I have not explicitly installed). Additionally, when I type which python
the output is /user/bin/python
. Python3 does appear to be installed in /user/local/bin
but is not being used. I think this is my problem, but it could also be something else.
Asked
Active
Viewed 2,707 times
1

PatMahiney
- 11
- 1
- 3
-
This depends on your PATH environment variable. – AKX Mar 05 '20 at 18:50
-
This link will help you https://stackoverflow.com/questions/43354382/how-to-switch-python-versions-in-terminal – PythonLearner Mar 05 '20 at 18:57
-
@AKX I have PATH set to "/user/local/bin:$PATH" in my .bash_profile. Is that correct? – PatMahiney Mar 05 '20 at 19:00
-
You probably mean `/usr/local/bin`, not `/user...` with an e in there. If that's already so, you may need to close your terminal and reopen it, or log out and back in again. – AKX Mar 05 '20 at 19:03
-
@Deb I don't believe this answers my question because this relates to changing from the default python 2.7 on MacOS to the installed version. My system is defaulting to a different version of Python3 than the one that I installed. – PatMahiney Mar 05 '20 at 19:04
-
@AKX Yes, I meant "/usr/". It is set correctly in my .bash_profile and was before I started this process. Restarting the terminal/logging in again doesn't fix the issue. – PatMahiney Mar 05 '20 at 19:09
-
"when I launch python using python3, it launches python 3.7.2 (which I have not explicitly installed)" what is the output of `which python3`? – bfontaine Mar 06 '20 at 16:14