Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python.h: No such file or directory even after using "quick fix" #337

Open
michioD opened this issue Feb 1, 2023 · 1 comment
Open

Python.h: No such file or directory even after using "quick fix" #337

michioD opened this issue Feb 1, 2023 · 1 comment

Comments

@michioD
Copy link

michioD commented Feb 1, 2023

Python version: 3.8.1
I added Python.h and Numpy on the path with a json file.

I tried compiling the animation example. And I got the following error:

PS C:\CPPScripts\cpp_tmp_scripts\matplotlib-cpp\examples> g++ .\animation.cpp -o animation
In file included from .\animation.cpp:3:
.\../matplotlibcpp.h:5:10: fatal error: Python.h: No such file or directory
 #include <Python.h>
          ^~~~~~~~~~
compilation terminated.

Apparently matlabplotcpp.h still doesn't see the Python.h file despite I put in the required paths.

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "C:\\Users\\foo\\AppData\\Local\\Programs\\Python\\Python38-32\\include",
                "C:\\Users\\foo\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\site-packages\\numpy\\core\\include"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\Strawberry\\c\\bin\\gcc.exe",
            "cStandard": "gnu17",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "windows-gcc-x64"
        }
    ],
    "version": 4
}

How do I fix this?

@alexsneering
Copy link

had you resolve it? I metting same quetion -. -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants