Mac用brew安装python3.6 [英] Mac install python3.6 with brew
本文介绍了Mac用brew安装python3.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想安装python 3.6版.
当我执行brew install python
时,它将安装最新版本的python,即3.8
.
I want to install python version 3.6.
when I do brew install python
it installs latest version of python i.e 3.8
.
我尝试了以下解决方案,但它给了我错误.
I tried below solution but it is giving me error.
brew install --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
错误:
错误:已禁用从GitHub提交URL调用python安装!使用"brew extract python"来稳定在GitHub上的点击.
Error: Calling Installation of python from a GitHub commit URL is disabled! Use 'brew extract python' to stable tap on GitHub instead.
我什至在当我这样做时:
brew search python
我找不到python@3.6
初始化
推荐答案
也许您应该执行pyenv
来管理不同的python版本.
Maybe you should do pyenv
to manage the different python versions.
brew install pyenv
pyenv install 3.6.5
pyenv install 3.7.4
如果要控制外壳使用不同的python版本,可以尝试以下操作:
If you want to control the shell to use different python versions, you can try this:
pyenv shell 3.6.5
这篇关于Mac用brew安装python3.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文