brew在哪里安装Python标头?

我正在尝试编译一个简单的“ Hello,World!”.在Cython.在文件中,我有:

print("Hello, World!")

我跑:

cython hello_world.pyx

获取hello_world.c文件.然后,我尝试:

gcc -c hello_world.c

给出错误:

fatal error: 'Python.h' file not found

然后我尝试了this

gcc -c hello_world.c -framework Python

没用我已将“ Python.h”更改为< Python / Python.h>.并得到了另一个错误:

fatal error: 'longintrepr.h' file not found

无论如何,我都想使用Python3,而不是Apple附带的Python,但是我无法弄清楚Python3开发标头的位置.

最终,我希望能够编译hello_world.c,使其在Python3解释器中运行.

(如果有帮助,我正在使用brew的python3.5.2_1.)

解决方法:

当前是/usr/local/Frameworks/Python.framework/Headers.

相关文章

最近做自动化测试时,深感自己对前端涉猎太少,加上对这块比...
homebrew本身就是一个git仓库。使用homebrew安装软件包时,会...
一、Homebrew安装、卸载等命令Homebrew的安装和卸载都非常简...
在mac系统中,使用homebrew可以很方便的管理包。按照官网的说...
我按照说明从这里使用brew安装mysqlhttps://gist.github.com...
我在macOS10.12.4上安装了nginx1.10.3和php5.5.38作为开发服...