我正在尝试使用以下命令在OS X 10.14上通过pip(Python 3.6)安装setproctitle:
(venv36) MacBook-Pro-Nikita-2:xgun iscientist$ pip3 install setproctitle
然后我得到以下错误:
Running setup.py bdist_wheel for setproctitle ... error
Complete output from command /Users/iscientist/xgun/venv36/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/mq/ktmqb9m14p133g0sbykrgcr00000gq/T/pip-install-u0avfy7r/setproctitle/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/mq/ktmqb9m14p133g0sbykrgcr00000gq/T/pip-wheel-f8pukum1 --python-tag cp36:
running bdist_wheel
running build
running build_ext
building 'setproctitle' extension
creating build
creating build/temp.macosx-10.9-x86_64-3.6
creating build/temp.macosx-10.9-x86_64-3.6/src
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wno-error -DSPT_VERSION=1.1.10 -D__darwin__=1 -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/setproctitle.c -o build/temp.macosx-10.9-x86_64-3.6/src/setproctitle.o
In file included from src/setproctitle.c:14:
In file included from src/spt.h:15:
In file included from src/spt_python.h:14:
/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/Python.h:14:2: error: "Something's broken. UCHAR_MAX should be defined in limits.h."
#error "Something's broken. UCHAR_MAX should be defined in limits.h."
^
/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/Python.h:18:2: error: "Python's source code assumes C's unsigned char is an 8-bit type."
#error "Python's source code assumes C's unsigned char is an 8-bit type."
^
2 errors generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for setproctitle
谷歌搜索时间无济于事:(
我已经安装了最新版本的Xcode和Xcode命令行工具。