llllllllll/c-extension-tutorial

source setup-env fails with Xcode errors (Macbook running Sierra)

seanharr11 opened this issue · 2 comments

Here is the stderr of the setup-env command, anything obvious jump out to anyone? (trying to hack around it now)

 Updating Homebrew...
  ^[[33mWarning:^[[0m openssl is a keg-only and another version is linked to opt.
  ^[[33mWarning:^[[0m xz-5.2.3 already installed
  Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SD
    Ks/MacOSX10.12.sdk/usr/include/c++/4.2.1
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(dynamic_annotations.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(pymath.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(dynamic_annotations.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(pymath.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(dynamic_annotations.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(pymath.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(dynamic_annotations.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(pymath.o) has no symbols
 Error: Command '['/Users/SeanH/git/c-extension-tutorial/venv/bin/python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

The message Environment is **not** setup correctly! is also printed to stdout...

For those of you who didn't read @llllllllll 's first email (like myself), you need to run the following command to fix the above issues:

xcode-select --install

Leaving open in hopes someone else finds this in the next 4 hours...