我正在尝试安装pyobjc-core,这是pyautogui的要求。安装时我收到以下错误。我已经使用更新了setuptools pip3 install --upgrade setuptools以及sudo python3 ez_setup.py。我在OSX Yosemite上使用Python 3.5。
我看到下面的代码需要xcode。这可能是为什么这个装置需要xcode的原因?
pip3 install pyobjc-core Collecting pyobjc-core Using cached pyobjc-core-3.1.1.tar.gz Complete output from command python setup.py egg_info: running egg_info creating pip-egg-info/pyobjc_core.egg-info writing include/pyobjc-compat.h to pip-egg-info/pyobjc_core.egg-info/include/pyobjc-compat.h writing include/pyobjc-api.h to pip-egg-info/pyobjc_core.egg-info/include/pyobjc-api.h writing namespace_packages to pip-egg-info/pyobjc_core.egg-info/namespace_packages.txt writing top-level names to pip-egg-info/pyobjc_core.egg-info/top_level.txt writing dependency_links to pip-egg-info/pyobjc_core.egg-info/dependency_links.txt writing pip-egg-info/pyobjc_core.egg-info/PKG-INFO writing manifest file 'pip-egg-info/pyobjc_core.egg-info/SOURCES.txt' warning: manifest_maker: standard file '-c' not found 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 "", line 1, in File "/private/var/folders/zw/573csqzn0pnbjkb44gw2s7800000gn/T/pip-build-72bxsxfe/pyobjc-core/setup.py", line 696, in **parse_package_metadata() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/private/var/folders/zw/573csqzn0pnbjkb44gw2s7800000gn/T/pip-build-72bxsxfe/pyobjc-core/setup.py", line 371, in run egg_info.egg_info.run(self) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/egg_info.py", line 193, in run File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/egg_info.py", line 216, in find_sources File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/egg_info.py", line 300, in run File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/egg_info.py", line 329, in add_defaults File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/sdist.py", line 132, in add_defaults File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 299, in get_finalized_command cmd_obj.ensure_finalized() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 107, in ensure_finalized self.finalize_options() File "/private/var/folders/zw/573csqzn0pnbjkb44gw2s7800000gn/T/pip-build-72bxsxfe/pyobjc-core/setup.py", line 525, in finalize_options universal_newlines=True).strip() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 629, in check_output **kwargs).stdout File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 711, in run output=stdout, stderr=stderr) 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/zw/573csqzn0pnbjkb44gw2s7800000gn/T/pip-build-72bxsxfe/pyobjc-core/
答案 0 :(得分:1)
是的,错误是明确的,你需要xcode ...它很愚蠢但不幸的是有这些“开发者工具”与它相关联,并且因为许多软件包需要开发工具(在你的特定情况下“xcodebuild”需要它你必须安装xcode(无论如何它是免费的)