【发布时间】:2016-04-12 15:24:10
【问题描述】:
我一直在使用 Cython 将我的 Python 文件编译成 C 文件,然后使用 MinGW 从 C 文件创建可执行文件。 Cython 工作正常,我可以在命令行中输入cython test.pyx 并获取一个 C 文件。问题是当我尝试从 C 文件编译可执行文件时。如果我输入 gcc test.c 我会收到以下错误:
test.c:4:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
非常感谢您的帮助。我正在运行 Windows 7 和 python 3.5。
【问题讨论】: