matplotlib-cpp icon indicating copy to clipboard operation
matplotlib-cpp copied to clipboard

File Not Found errors when installing matplotlib-cpp on Mac with Xcode and Python

Open KGx55 opened this issue 3 years ago • 1 comments

This is about an attempt to install matplotlib-cpp.h onto a Mac. I have been looking for a solution, but have not yet found one.

When installing this onto the Mac running Xcode 13.4.1 and Python3.10.5. Xcode was first updated, and then Python was installed, then pip was used to install matplotlib. All operated correctly. In order to install matplotlib for C++, I downloaded matplotlib-cpp and placed it into its own directory.

The sample program minimal.cpp was used to create a new Xcode project.

In that project-program, the line, #include "../matplotlibcpp.h" Returned a file not found error.

When a specific path to the file was added to the program, the compiler found matplotlibcpp.h but returned a file not found error for Python.h

After tracking down that error and providing a complete path, two more file not found errors emerged, and so on.

There must be a way to direct the compiler to use all the necessary include files and have them operate correctly. So far, I have not found code that pulls it all together and makes it work with the Xcode C++ example. Perhaps a future release could have instructions on how to accomplish the installation along with whatever is needed to reference all the needed include files.

KGx55 avatar Jun 22 '22 17:06 KGx55