I installed python3 with homebrew on my Mac. However, the latest Python3.6 cannot work well with some packages, so I decide to roll back to the 3.5.2.
Since homebrew/versions has been deprecated,I checkout the commit in the directory: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
git log python3.rb
There
commit ec545d45d4512ace3570782283df4ecda6bb0044
Author: BrewTestBot <[email protected]>
Date: Tue Oct 11 06:42:06 2016 +0100
python3: update 3.5.2_3 bottle.
Then
git chekcout ec545
brew install python3
However, it seems that homebrew update itself automatically I run $brew install [Formula]
➜ Formula git:(ec545d4) brew install python3
Updating Homebrew...
How to not update homebrew automatically when brew install some packages? Or how to install python 3.5.2 with homebrew?
Answer for the first question, How to not update homebrew automatically when brew install some packages?
hack code solution:
vim /usr/local/Homebrew/Library/Homebrew/brew.sh
Add return after line
update-preinstall() {
to:
update-preinstall() {
return
environment variable solution:
export HOMEBREW_NO_AUTO_UPDATE=1
or
export HOMEBREW_AUTO_UPDATING=0
or
export HOMEBREW_UPDATE_PREINSTALL=0
if U will always work, add it to .bash_profile
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