如何解决MacOSX 上的 pyenv 和诗歌安装
我正在尝试在运行 Big Sur 的 Macbook Pro 上安装 pyenv 和诗歌。
我遵循了所有可以在网上找到的说明和帮助,但是在尝试使用 pyenv install 3.9.0 安装全局 Python 版本时遇到了问题
这只会产生以下输出:
pyenv install 3.9.0
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.0.tar.xz...
-> https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz
Installing Python-3.9.0...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 11.4 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/_3/3n7g_jr918v2cj_pkdlfk5t40000gn/T/python-build.20210619130847.19436
Results logged to /var/folders/_3/3n7g_jr918v2cj_pkdlfk5t40000gn/T/python-build.20210619130847.19436.log
Last 10 log lines:
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "darwin"
checking for gcc... clang
checking whether the C compiler works... no
configure: error: in `/var/folders/_3/3n7g_jr918v2cj_pkdlfk5t40000gn/T/python-build.20210619130847.19436/Python-3.9.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found. Stop.
我创建了以下内容并将其添加到我的主文件夹中的 .zprofile 文件中 - 重新启动了 shell,即使似乎不需要在 macosx 上执行此操作...:
cat .zprofile
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
为 XCode 安装了命令行 C 编译器工具。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。