python - pip 命令“gcc”在安装 setproctitle 时失败,退出状态为 1
问题描述
我正在尝试在 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 命令行工具。
解决方案
推荐阅读
- amazon-web-services - AWS AppSync 解析器 Lambda 函数与速度模板语言 (VTL)
- linux - BASH/LINUX - 循环中的迭代求和问题(十进制数)
- c++ - 在 CMAKE 中使用具有静态依赖项的库
- visual-studio-code - 我用macbookpro在vscode上安装vim ext,但是vim不能工作,{hjkl}不能工作
- javascript - 无法将对象推送到数组中
- sql - 按日期名称转换列中的行
- php - 如何在 laravel 中检查用户角色并显示选择选项
- r - 使用 R 融合基于两行的数据集
- eclipse - 使用 FilteredTypesSelectionDialog 实现特定接口的过滤器类
- kotlin - 在 Kotlin 中用 * 替换电话号码