~~ I'm sorry. It's still unsolved. If you have solved it in the past, I would appreciate it if you could give me some advice. ~~
It seems that it has moved somehow.
Now it works! https://github.com/yyuu/pyenv/issues/448#issuecomment-220652296
export CFLAGS="-I$(brew --prefix openssl)/include"
export LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix sqlite3)/lib"
export CPPFLAGS="-I$(brew --prefix sqlite3)/include"
But I don't know why it didn't work and why it was fixed. .. ..
$ pyenv install 3.5.2
Installing Python-3.5.2...
BUILD FAILED (OS X 10.12.1 using python-build 20160602)
Inspect or clean up the working tree at /var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103191050.41922
Results logged to /var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103191050.41922.log
Last 10 log lines:
import pip
File "/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/tmp3hlbqezp/pip-8.1.1-py2.py3-none-any.whl/pip/__init__.py", line 14, in <module>
File "/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/tmp3hlbqezp/pip-8.1.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 27, in <module>
File "/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/tmp3hlbqezp/pip-8.1.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 36, in <module>
File "/private/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103191050.41922/Python-3.5.2/Lib/plistlib.py", line 65, in <module>
from xml.parsers.expat import ParserCreate
File "/private/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103191050.41922/Python-3.5.2/Lib/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: No module named 'pyexpat'
make: *** [install] Error 1
Even on github, I was told "Because it's broken ('-`) Silane"
ImportError: No module named pyexpat · Issue #544 · yyuu/pyenv
I want to do something that wasn't there once.
$ echo $PYENV_ROOT
/usr/local/var/pyenv
$ rm -r /usr/local/var/pyenv
$ brew uninstall pyenv python
$ brew install pyenv
$ pyenv install 3.5.2
No, it's no good!
Downloading Python-3.5.2.tar.xz...
-> https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
Installing Python-3.5.2...
BUILD FAILED (OS X 10.12.1 using python-build 20160602)
Inspect or clean up the working tree at /var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103193542.66147
Results logged to /var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103193542.66147.log
Last 10 log lines:
import pip
File "/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/tmpsbqryzv7/pip-8.1.1-py2.py3-none-any.whl/pip/__init__.py", line 14, in <module>
File "/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/tmpsbqryzv7/pip-8.1.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 27, in <module>
File "/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/tmpsbqryzv7/pip-8.1.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 36, in <module>
File "/private/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103193542.66147/Python-3.5.2/Lib/plistlib.py", line 65, in <module>
from xml.parsers.expat import ParserCreate
File "/private/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103193542.66147/Python-3.5.2/Lib/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: No module named 'pyexpat'
make: *** [install] Error 1
Refer to here ...
Python 3.4.2 doesn't build on OS X 10.10 Yosemite · Issue #298 · yyuu/pyenv
$ CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install 3.5.2
Downloading Python-3.5.2.tar.xz...
-> https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
Installing Python-3.5.2...
BUILD FAILED (OS X 10.12.1 using python-build 20160602)
Inspect or clean up the working tree at /var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103193925.80736
Results logged to /var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103193925.80736.log
Last 10 log lines:
import pip
File "/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/tmp7cp6pxz_/pip-8.1.1-py2.py3-none-any.whl/pip/__init__.py", line 14, in <module>
File "/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/tmp7cp6pxz_/pip-8.1.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 27, in <module>
File "/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/tmp7cp6pxz_/pip-8.1.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 36, in <module>
File "/private/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103193925.80736/Python-3.5.2/Lib/plistlib.py", line 65, in <module>
from xml.parsers.expat import ParserCreate
File "/private/var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103193925.80736/Python-3.5.2/Lib/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: No module named 'pyexpat'
make: *** [install] Error 1
Will it change ...
$ pyenv install 2.7.12
Downloading Python-2.7.12.tar.xz...
-> https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tar.xz
Installing Python-2.7.12...
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
Installing pip from https://bootstrap.pypa.io/get-pip.py...
error: failed to install pip via get-pip.py
BUILD FAILED (OS X 10.12.1 using python-build 20160602)
Inspect or clean up the working tree at /var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103194730.10697
Results logged to /var/folders/g5/b_nhsv5546g9pf7_k7xynpxw0000gn/T/python-build.20161103194730.10697.log
Last 10 log lines:
info = _mac_ver_xml()
File "/usr/local/var/pyenv/versions/2.7.12/lib/python2.7/platform.py", line 739, in _mac_ver_xml
pl = plistlib.readPlist(fn)
File "/usr/local/var/pyenv/versions/2.7.12/lib/python2.7/plistlib.py", line 78, in readPlist
rootObject = p.parse(pathOrFile)
File "/usr/local/var/pyenv/versions/2.7.12/lib/python2.7/plistlib.py", line 401, in parse
from xml.parsers.expat import ParserCreate
File "/usr/local/var/pyenv/versions/2.7.12/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: No module named pyexpat
Recommended Posts