gpt4 book ai didi

python - Mac 用 brew 安装 python3.6

转载 作者:行者123 更新时间:2023-12-03 13:46:52 24 4
gpt4 key购买 nike

我想安装 python 3.6 版。
当我这样做时 brew install python它安装最新版本的python,即3.8 .
我尝试了以下解决方案,但它给了我错误。

brew install --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
错误:

Error: Calling Installation of python from a GitHub commit URL is disabled! Use 'brew extract python' to stable tap on GitHub instead.


我什至在 this link 中尝试了解决方案但不工作。
当我这样做时:
brew search python
我没有找到 python@3.6在里面

最佳答案

也许你应该做 pyenv管理不同的python版本。

brew install pyenv
pyenv install 3.6.5
pyenv install 3.7.4
如果你想控制shell使用不同的python版本,你可以试试这个:
pyenv shell 3.6.5

关于python - Mac 用 brew 安装 python3.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63844926/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com