llllllllll / c-extension-tutorial

How to Write and Debug C Extension Modules
https://llllllllll.github.io/c-extension-tutorial/
38 stars 16 forks source link

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

Open seanharr11 opened 7 years ago

seanharr11 commented 7 years ago

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.
seanharr11 commented 7 years ago

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

seanharr11 commented 7 years ago

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...