I'm running MacOS Sierra 10.12.4 and I've realized that homebrew python was upgraded to version 2.7.13. How can I switch back to 2.7.10?
Use Pyenv to Downgrade Python on Linux Pyenv allows us to switch between different versions of Python by creating environments. We can install the required version of Python using the pyenv install python_version command on the terminal. After that, we can view the available versions using the pyenv versions command.
You can switch versions with brew switch
. For instance I just downgraded Python 3.7.0 to 3.6.5 like this:
brew switch python 3.6.5
Unfortunately, the brew versions
command has been deprecated, and it's currently pretty complicated to locate the available versions. I'd love to hear a simple solution to this. Meanwhile, if you know the version you want to switch to, try the above command.
I agree with the answers here that virtualenvs are a good idea, but having the version of Python you need in homebrew is also a good idea. The way my virtualenvs were created, bin/python
was a symlink to /usr/local/bin/python
, so things broke when Python was updated via homebrew.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With