Install pypy3.5-5.10.0 on macOS 10.13.2:
CFLAGS="-I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/readline/lib" CPPFLAGS="-I/usr/local/opt/zlib/include -I/usr/local/opt/readline/include" pyenv install pypy3.5-5.10.0
error log:
Downloading pypy3-v5.10.0-osx64.tar.bz2...
-> https://bitbucket.org/pypy/pypy/downloads/pypy3-v5.10.0-osx64.tar.bz2
Installing pypy3-v5.10.0-osx64...
/usr/local/bin/python-build: line 1651: 11486 Abort trap: 6 "$PYTHON_BIN" -c "import $1" > /dev/null 2>&1
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
/usr/local/bin/python-build: line 1660: 11487 Abort trap: 6 "$PYTHON_BIN" -c "import $1" > /dev/null 2>&1
ERROR: The Python zlib extension was not compiled. Missing the zlib?
Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems
BUILD FAILED (OS X 10.13.2 using 0000000000)
Inspect or clean up the working tree at /var/folders/g9/m3cmg0m10cl80xt362wpsld00000gn/T/python-build.20180111115741.11402
Results logged to /var/folders/g9/m3cmg0m10cl80xt362wpsld00000gn/T/python-build.20180111115741.11402.log
Last 10 log lines:
/var/folders/g9/m3cmg0m10cl80xt362wpsld00000gn/T/python-build.20180111115741.11402 ~
HTTP/1.1 200 Connection established
/var/folders/g9/m3cmg0m10cl80xt362wpsld00000gn/T/python-build.20180111115741.11402/pypy3-v5.10.0-osx64 /var/folders/g9/m3cmg0m10cl80xt362wpsld00000gn/T/python-build.20180111115741.11402 ~
Is there something changes? It works to build cpython.
You may need to install a few extra libs locally. Try this:
brew install libffi
brew install ncurses
To debug further, try looking in the tmp build directory referenced in the error message (above it is /var/folders/g9/m3cmg0m10cl80xt362wpsld00000gn/T/python-build.20180111115741.11402/pypy3-v5.10.0-osx64
) and run pypy3 manually. On my install the crash message referenced the missing libraries above. After brew installing them I was able to install pypy3 via pyenv without error.
I ran into this myself with pypy3.5-5.10.0 (macOS 10.13.3 High Sierra) and brew installing those packages didn't really help. I did find that installilng pypy3.5.-5.10.1 works just fine, so I didn't bother looking into it further.
I had the same error. I can only recommend looking into the build.log
. In my case it turned out that some x11-header file couldn't be found. I ran xcode-select --install
which installed an available update to the command-line tools and I was finally able to build python 2.7 successfully.
Most helpful comment
You may need to install a few extra libs locally. Try this:
To debug further, try looking in the tmp build directory referenced in the error message (above it is
/var/folders/g9/m3cmg0m10cl80xt362wpsld00000gn/T/python-build.20180111115741.11402/pypy3-v5.10.0-osx64
) and run pypy3 manually. On my install the crash message referenced the missing libraries above. After brew installing them I was able to install pypy3 via pyenv without error.