Downloading Python-3.6.2.tar.xz...
-> https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz
Installing Python-3.6.2...
BUILD FAILED (OS X 10.12.6 using python-build 20160602)
Inspect or clean up the working tree at tmp/python-build.20171006111833.42350
Results logged to tmp/python-build.20171006111833.42350.log
Last 10 log lines:
copying build/lib.macosx-10.12-x86_64-3.6/__pycache__/_sysconfigdata_m_darwin_darwin.cpython-36.opt-1.pyc -> /usr/local/var/pyenv/versions/3.6.2/lib/python3.6/lib-dynload/__pycache__
dyld: lazy symbol binding failed: Symbol not found: _utimensat
Referenced from: /private/var/folders/69/l41l_yds6v58pnbnv2lbf1fc0000gn/T/python-build.20171006111833.42350/Python-3.6.2/./python.exe
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _utimensat
Referenced from: /private/var/folders/69/l41l_yds6v58pnbnv2lbf1fc0000gn/T/python-build.20171006111833.42350/Python-3.6.2/./python.exe
Expected in: /usr/lib/libSystem.B.dylib
I think running xcode-select --install will fix your problem. If not, please do a search on the issues list for your error message. The one you have posted here is quite common and could be solved by browsing the wiki or the previously closed issues.
@joshfriend : Maybe it would be cool to detect if command-line tools are properly installed?
something like xcode-select -p can help, and xcode-select --install can be emitted automatically if necessary.
This may be related: https://bugs.python.org/issue31601
I have this issue on Sierra. Have not tried on High Sierra yet.
Most helpful comment
I think running
xcode-select --installwill fix your problem. If not, please do a search on the issues list for your error message. The one you have posted here is quite common and could be solved by browsing the wiki or the previously closed issues.