gpt4 book ai didi

pyenv - Homebrew pyenv ... 无法安装 Python 3.8.3,尽管我已经安装了它

转载 作者:行者123 更新时间:2023-12-03 15:37:51 27 4
gpt4 key购买 nike

我通过 pyenv 安装了 3.8.2,但我想在本地机器上升级到 3.8.3,以匹配我们在生产中使用的版本。

$  pyenv install 3.8.3
python-build: definition not found: 3.8.3

The following versions contain `3.8.3' in the name:
miniconda-3.8.3
miniconda3-3.8.3

See all available versions with `pyenv install --list'.

If the version you need is missing, try upgrading pyenv:

brew update && brew upgrade pyenv

好吧,让我们试试看...
$  brew update && brew upgrade pyenv
Updating Homebrew...
Warning: pyenv 1.2.18 already installed

我不清楚从哪里提供 pyenv 安装的 Python 版本。我已经安装了 3.8.3:
$  brew info python@3.8
python@3.8: stable 3.8.3 (bottled) [keg-only]
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/python@3.8/3.8.2 (4,137 files, 63.0MB)
Poured from bottle on 2020-04-21 at 11:47:57
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python@3.8.rb
==> Dependencies
Build: pkg-config ✔
Required: gdbm ✔, openssl@1.1 ✔, readline ✔, sqlite ✘, xz ✔
==> Caveats
Python has been installed as
/usr/local/opt/python@3.8/bin/python3

You can install Python packages with
/usr/local/opt/python@3.8/bin/pip3 install <package>
They will install into the site-package directory
/usr/local/Cellar/python@3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages

See: https://docs.brew.sh/Homebrew-and-Python

python@3.8 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

==> Analytics
install: 398,535 (30 days), 966,259 (90 days), 1,270,935 (365 days)
install-on-request: 11,428 (30 days), 29,656 (90 days), 42,309 (365 days)
build-error: 0 (30 days)

所以并不是说 3.8.3 在 Homebrew 中不可用。我的 Homebrew “链接” Python 是 3.7.7,但这并没有阻止我安装 3.8.2。

我们是否只是在等待 pyenv 向 Homebrew 推送新版本?有什么方法可以将 pyenv 指向我现有的 Homebrew 安装的 3.8.3?

最佳答案

您要么必须等待新的 Homebrew pyenv 版本,自己制作发行版并将其拉入 Homebrew,或者安装 pyenv 的主分支。

安装 pyenv 和 3.8.3 的 master 分支:

brew unlink pyenv
brew install pyenv --head
pyenv install 3.8.3

有关 3.8.3 版本的更多信息: https://github.com/pyenv/pyenv/pull/1612

关于pyenv - Homebrew pyenv ... 无法安装 Python 3.8.3,尽管我已经安装了它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62169855/

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