我已经通过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 [email protected]
[email protected]: stable 3.8.3 (bottled) [keg-only]
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/[email protected]/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/[email protected]
==> Dependencies
Build: pkg-config ✔
Required: gdbm ✔, [email protected] ✔, readline ✔, sqlite ✘, xz ✔
==> Caveats
Python has been installed as
/usr/local/opt/[email protected]/bin/python3
You can install Python packages with
/usr/local/opt/[email protected]/bin/pip3 install <package>
They will install into the site-package directory
/usr/local/Cellar/[email protected]/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
See: https://docs.brew.sh/Homebrew-and-Python
[email protected] 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中不可用。我的自制软件“链接” Python是3.7.7,但这并没有阻止我安装3.8.2。
我们只是在等待pyenv将新版本推向Homebrew吗?有什么办法可以将pyenv指向我现有的Homebrew安装的3.8.3?
您要么必须等待新的Homebrew pyenv发行版,自己制作发行版,然后将其拉入Homebrew,要么安装pyenv的master分支。
要安装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
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句