Search code examples
pythonmacospython-2.7installationpyobjc

error installing PyObjC osX


I am new to Python and I am desperately trying to install PyObjC via spyder. The command

pip install PyObjC

returns an error:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/0v/cg_rdz_x4d32jm6hz7n5txgh3djxb1/T/pip-build-UBlDtP/pyobjc-core/

No solutions found in other posts worked. I have also tried to install the whole thing manually & via conda. It seems that Xcode is installed. And it is the only module I have had issues with.

Any suggestions? :)

Note: I´m working with Python 2.7, on a macOS Sierra 10.12


Solution

  • The actual error message which can help more is in the beginning of the traceback. In my case it is

    xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      ...
    

    If you are getting the same, here are the answers on how to debug this: xcode-select active developer directory error