如何通过 Pyenv 在 Mac 上安装 Python?

Alb*_*nez 5 python macos openssl pyenv

我想在 Mac 10.15.1 上安装 python 3.4.2

我已经运行: $ pyenv install 3.4.2

但出现错误:

忽略 ensurepip 失败:pip 1.5.6 需要 SSL/TLS

搜索我发现这个链接有常见的构建问题

我已经通过自制软件安装了 openssl

$ brew install openssl

$ xcode-select --install

并尝试使用其他两个标记的命令:

$ CFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib" pyenv install -v 3.4.2

$ CFLAGS=-I/usr/include/openssl LDFLAGS=-L/usr/lib64 pyenv install -v 3.4.2

但恐怖依然存在。

这是最后的 10 行日志:

(cd /Users/albertosanmartinmartinez/.pyenv/versions/3.4.2/share/man/man1; ln -s python3.4.1 python3.1)
if test "xupgrade" != "xno"  ; then \
  case upgrade in \
        upgrade) ensurepip="--upgrade" ;; \
        install|*) ensurepip="" ;; \
    esac; \
     ./python.exe -E -m ensurepip \
        $ensurepip --root=/ ; \
fi
Ignoring ensurepip failure: pip 1.5.6 requires SSL/TLS
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙吗?提前致谢