在 macOS M1 上使用 pyenv 安装 python 的问题

时间:2021-07-12 13:22:58

标签: python zsh macos-big-sur pyenv

我正在尝试使用 pyenv 准备多版本 python 开发环境。我已经成功安装了 pyenv。我通过自制软件 (https://github.com/pyenv/pyenv#homebrew-on-macos) 安装了 pyenv。但是当我尝试安装python版本时,我遇到了一个错误:

➜  live_xr_cms_api git:(dev) ✗ pyenv install 3.9.6
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.6.tar.xz...
-> https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tar.xz
Installing Python-3.9.6...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems


BUILD FAILED (OS X 11.4 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/b_/4pdsw1_15bx8l23n5wbblflc0000gn/T/python-build.20210712183213.13974
Results logged to /var/folders/b_/4pdsw1_15bx8l23n5wbblflc0000gn/T/python-build.20210712183213.13974.log

Last 10 log lines:
                        $ensurepip --root=/ ; \
        fi
Looking in links: /var/folders/b_/4pdsw1_15bx8l23n5wbblflc0000gn/T/tmp85zin3_g
Processing /private/var/folders/b_/4pdsw1_15bx8l23n5wbblflc0000gn/T/tmp85zin3_g/setuptools-56.0.0-py3-none-any.whl
Processing /private/var/folders/b_/4pdsw1_15bx8l23n5wbblflc0000gn/T/tmp85zin3_g/pip-21.1.3-py3-none-any.whl
Installing collected packages: setuptools, pip
  WARNING: The scripts pip3 and pip3.9 are installed in '/Users/anzhari/.pyenv/versions/3.9.6/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  NOTE: The current PATH contains path(s) starting with `~`, which may not be expanded by all applications.
Successfully installed pip-21.1.3 setuptools-56.0.0

0 个答案:

没有答案