简体   繁体   中英

Error installing PyObjc: command '/usr/bin/clang' failed

I've been working on a python script, first using the Psychopy compiler, which already included all I needed, but now I need to make it the more independent as possible. I have the script working on a Windows computer, but I also want it to work in OSX.

The script uses pyglet and I followed this post in order to install it. However, when I reach the latest step, which is installing PyObjc, I have the following error:

40 warnings and 1 error generated.

error: command '/usr/bin/clang' failed with exit status 1

----------------------------------------
Cleaning up...
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/var/folders/fk/1plt8wj53_d183pv59scmg4m0000gn/T/pip_build_JL/pyobjc-core/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/fk/1plt8wj53_d183pv59scmg4m0000gn/T/pip-HfEjaW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/fk/1plt8wj53_d183pv59scmg4m0000gn/T/pip_build_JL/pyobjc-core
Storing debug log for failure in /Users/JL/.pip/pip.log

Why does this error appears? What can I do to solve it?

Terminal post:

xcode-select --install

may be can help you.

Try installing pyobjc separately first.

On OSX 10.7 or 10.8, try:

env CC=clang pip -U pyobjc-core
env CC=clang pip -U pyobjc

On OSX 10.9, try:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pyobjc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM