我正试图从macOs High Sierra的终端安装couchapp。在
我已经安装了python2.7.10(默认情况下),并根据couchapp文档运行$ pip2 install couchapp
。在
这是我得到的错误:
src/watchdog_fsevents.c:22:10: fatal error: 'Python/Python.h' file not found
#include <Python/Python.h>
^~~~~~~~~~~~~~~~~
1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Failed building wheel for watchdog
以下是我在/System/Library/Frameworks中执行$ ls
时所得到的结果/Python.framework/
我目前所做的努力:
$ xcode-select --install
你知道吗?我读过其他的帖子,但他们没有解决我的问题。在
谢谢你
在安装了Xcode CLI工具的High Sierra(10.13.5)安装程序上也遇到了一个非常类似的问题;对我来说Python.h位于
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
(一些资源说可以通过
find /usr/local/Cellar/ -name Python.h
找到该位置,但是如果您的python没有与brew一起安装,这似乎不起作用。)将位置添加到您的C include路径中,或者在编译时通过设置-I标志作为标志:
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
。在让我困惑的是import语句应该看起来像:},如果Python.h直接在
#include <Python.h>
而不是{python2.7
目录中。在希望有帮助
相关问题 更多 >
编程相关推荐