1

I was trying to prepare multi-version python development environment using pyenv. I've succesfully installed the pyenv. I installed the pyenv through homebrew (https://github.com/pyenv/pyenv#homebrew-on-macos). But when I was trying to install a python version, I've encountered an error:

➜  live_xr_cms_api git:(dev) ✗ pyenv install 3.9.6
python-build: use [email protected] 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
5
  • Use Nix instead. Commented Jul 12, 2021 at 13:25
  • stackoverflow.com/q/65653464/14122 Commented Jul 12, 2021 at 13:26
  • That said, if you're really attached to pyenv, squademy.medium.com/… is suggested by another answer on that question. Personally, though, I can only help with the Nix approach. Commented Jul 12, 2021 at 13:27
  • 1
    I've given on trying to make pyenv work. Ended up using conda miniforge instead. Commented Jul 26, 2021 at 10:22
  • Consider deleting the question, if you're no longer pursuing an answer Commented Sep 19, 2021 at 22:05

1 Answer 1

8

Execute the command from the Rosetta Terminal

pyenv install [version]

Sign up to request clarification or add additional context in comments.

1 Comment

Omg, so easy. I thought previously installed rosetta homebrew is enough stackoverflow.com/questions/66035003/…. But it seems pyenv triggers "outside" xcode sdk. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.