从python中找到python头路径?

Wol*_*tan 7 python numpy header-files

相当于什么

numpy.get_include()
Run Code Online (Sandbox Code Playgroud)

如用于此处的Python,让我在Python的头文件所在的目录路径?

iam*_*ush 16

头文件位于include目录中.

您可以使用distutils.sysconfig模块找到include dir

from distutils.sysconfig import get_python_inc
get_python_inc() #this gives the include dir
Run Code Online (Sandbox Code Playgroud)

你可以在这里阅读它