我正在尝试按照本教程编译一个简单的python/C示例:
http://www.swig.org/tutorial.html
我在MacOS上使用Anaconda python.
但是,当我跑
gcc -c example.c example_wrap.c -I/Users/myuser/anaconda/include/
我明白了:
example_wrap.c:130:11: fatal error: 'Python.h' file not found # include^
似乎在一些问题中报告了这个问题:
尝试编译C扩展模块时缺少Python.h.
缺少Python.h,无法找到
Python.h:没有这样的文件或目录
但似乎没有一个在MacOS上提供Anaconda特有的答案
有人解决了吗?