我已经安装了Python,但是gcc找不到Python.h

时间:2020-08-02 14:20:23

标签: python c++ gcc

我正在尝试使用c ++构建python模块,但是每次尝试构建某些东西时,都会出现错误消息

严重错误:Python.h:没有这样的文件或目录

这是我所运行的:

gcc -Wall -I /usr/lib/python3.8 hello.cpp -o hello.so

我在usr / include / python3.8目录中找到了Python.h文件,并且在shell中运行find Python.h也会按预期找到它。

我已经安装了python3-dev并尝试重新安装它。 它是最新版本(3.8.2-0ubuntu2)

0 个答案:

没有答案