在vscode中找不到python.h文件

时间:2019-03-29 01:47:47

标签: python c++ visual-studio-code

我已经在c_cpp_properties.json中设置了includePath,该文件指向python3.7m,而python3.7m拥有此文件。

{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "/Library/Frameworks/Python.framework/Versions/3.7//include/python3.7m",
                "${workspaceFolder}/**"

            ],
            "defines": [
                "_DEBUG"
            ],
            "macFrameworkPath": [],
            "compilerPath": "/usr/local/bin/gcc-8",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}

当我创建一个名为foo.cpp的文件并包含Python.h时

#include <Python.h>

错误消息说找不到“ Python.h”文件。但是智能提示还可以。

0 个答案:

没有答案