Reputation: 705
sudo pip install pyobjc
returns:
File "/Users/USER/anaconda/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/xcodebuild', '-version', '-sdk', 'macosx', 'Path']' returned non-zero exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/48/0c48tlds0knggddqs9lwf5900000gn/T/pip-build-RZEwHr/pyobjc-core
while both
easy_install -U pyobjc
and
python install setup.py install
return
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 "setup.py", line 185, in <module>
keywords=['Objective-C', 'bridge', 'Cocoa'],
... many more lines of output ... File "/Users/USER/anaconda/lib/python2.7/pickle.py", line 1382, in loads return Unpickler(file).load() File "/Users/USER/anaconda/lib/python2.7/pickle.py", line 858, in load dispatchkey File "/Users/USER/anaconda/lib/python2.7/pickle.py", line 1133, in load_reduce value = func(*args) TypeError: init() takes at least 3 arguments (1 given)
At least a few other people have run into a similar problem: errorr installing pyobjc on Anaconda python on OSX 10.10.2
Has anyone solved it?
Upvotes: 0
Views: 511
Reputation: 795
Recent versions of OSX ship with a precompiled PyObjc, if you're able to use the Mac version of Python you should be able to import it: python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import objc
>>> objc.__path__
['/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/objc']
Upvotes: 2