【发布时间】:2021-03-04 20:11:59
【问题描述】:
在我的 MacBook Air OS Big Sur 上安装 Python 3.6.13 时,使用命令 pyenv install 3.6.13 我收到此错误:
Installing Python-3.6.13...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 11.3 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/7j/0qtpb8vs1_s34ynv0f6rrs840000gn/T/python-build.20210304114832.65954
Results logged to /var/folders/7j/0qtpb8vs1_s34ynv0f6rrs840000gn/T/python-build.20210304114832.65954.log
Last 10 log lines:
./Modules/posixmodule.c:8210:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret = sendfile(in, out, offset, &sbytes, &sf, flags);
^
./Modules/posixmodule.c:10432:5: warning: code will never be executed [-Wunreachable-code]
Py_FatalError("abort() called from Python code didn't abort!");
^~~~~~~~~~~~~
1 warning and 1 error generated.
1 warning generated.
make: *** [Modules/posixmodule.o] Error 1
make: *** Waiting for unfinished jobs....
任何有关如何解决此问题或其他解决方法以安装 python 3.6.13 的建议将不胜感激。我目前有 python 3.8,但需要 3.6 才能运行:
conda install -c deezer-research spleeter
【问题讨论】:
-
github.com/pyenv/pyenv/issues/1740 好像和你的3.6问题一样
-
你看过
asdf吗? asdf-vm.com 这是个人喜好,但我发现它是解决 Python 版本控制问题的最简单方法。 -
@Everett
asdf很棒,但它在后台使用了pyenv,所以这个线程对于这两个工具都是真实的。
标签: python