从python中找到python头路径?

时间:2020-12-01 15:06:37

What is the equivalent of

相当于什么

numpy.get_include()

as used here for Python, giving me the path to the directory where the Python header files are located?

这里用于Python,给我Python头文件所在目录的路径?

1 个解决方案

#1


13  

The header files are in include directory.

头文件位于include目录中。

You can find the include dir using the distutils.sysconfig module

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

from distutils.sysconfig import get_python_inc
get_python_inc() #this gives the include dir

You can read about it here

你可以在这里读到它

#1


13  

The header files are in include directory.

头文件位于include目录中。

You can find the include dir using the distutils.sysconfig module

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

from distutils.sysconfig import get_python_inc
get_python_inc() #this gives the include dir

You can read about it here

你可以在这里读到它