Created
October 4, 2017 03:28
-
-
Save kunishi/cdfaa582ffcbe06f9da41c312f374406 to your computer and use it in GitHub Desktop.
pyenv install 3.6.2 failed on HighSierra
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BUILD FAILED (OS X 10.13 using python-build 20160602) | |
Inspect or clean up the working tree at /var/folders/nq/5pyc_js10jz0kq7wps9b5gkm0000gn/T/python-build.20171004122245.24032 | |
Results logged to /var/folders/nq/5pyc_js10jz0kq7wps9b5gkm0000gn/T/python-build.20171004122245.24032.log | |
Last 10 log lines: | |
import pip | |
File "/var/folders/nq/5pyc_js10jz0kq7wps9b5gkm0000gn/T/tmpr17v5c3y/pip-9.0.1-py2.py3-none-any.whl/pip/__init__.py", line 26, in <module> | |
File "/var/folders/nq/5pyc_js10jz0kq7wps9b5gkm0000gn/T/tmpr17v5c3y/pip-9.0.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 27, in <module> | |
File "/var/folders/nq/5pyc_js10jz0kq7wps9b5gkm0000gn/T/tmpr17v5c3y/pip-9.0.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 35, in <module> | |
File "/private/var/folders/nq/5pyc_js10jz0kq7wps9b5gkm0000gn/T/python-build.20171004122245.24032/Python-3.6.2/Lib/plistlib.py", line 65, in <module> | |
from xml.parsers.expat import ParserCreate | |
File "/private/var/folders/nq/5pyc_js10jz0kq7wps9b5gkm0000gn/T/python-build.20171004122245.24032/Python-3.6.2/Lib/xml/parsers/expat.py", line 4, in <module> | |
from pyexpat import * | |
ModuleNotFoundError: No module named 'pyexpat' | |
make: *** [install] Error 1 |
set --with-system-expat option to configure:
PYTHON_CONFIGURE_OPTS="--with-system-expat" CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-I$(brew --prefix openssl)/lib -I$(brew --prefix readline)/lib" pyenv install -v 3.6.2
Oops! mistyped LDFLAGS...
PYTHON_CONFIGURE_OPTS="--with-system-expat" CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib" pyenv install 3.6.2
It just works!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
compile option is as follows: