You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried adding matplotlib-cpp to my project as a sanity-checking tool but I've encountered a handful of errors when building. Specifically:
1>C:\Users\user\Source\repos\project\matplotlibcpp.h(174,9): error C4996: 'Py_SetProgramName': deprecated in 3.11 1>C:\Users\user\Source\repos\project\matplotlibcpp.h(182,9): error C4996: 'PySys_SetArgv': deprecated in 3.11 1>C:\Users\user\Source\repos\project\matplotlibcpp.h(354,10): error C2766: explicit specialization; 'matplotlibcpp::detail::select_npy_type<int64_t>' has already been defined 1>C:\Users\user\Source\repos\project\matplotlibcpp.h(345,10): message : see previous definition of 'select_npy_type<__int64>' 1>C:\Users\user\Source\repos\project\matplotlibcpp.h(356,10): error C2766: explicit specialization; 'matplotlibcpp::detail::select_npy_type<uint64_t>' has already been defined 1>C:\Users\user\Source\repos\project\matplotlibcpp.h(349,10): message : see previous definition of 'select_npy_type<unsigned __int64>'
I'm on Windows 10 using Visual Studio 2022 and, as you may have guessed, Python 3.11. Initially tried linking the relevant files manually, then again using vcpkg, with the error unsurprisingly persisting. I've resolved to just push my data into pyplot via fstream since that's probably less hassle than trying to solve this or change Python versions, but I figured I'd raise the issue.
The text was updated successfully, but these errors were encountered:
I also got these issues. The warnings you're encountering are related to deprecated functions in the Python C API. These functions, such as Py_SetProgramName and PySys_SetArgv, are marked as deprecated in Python 3.11 and later versions. And I currently use 3.12 version. The matplotlibcpp library you're using is calling these deprecated functions, which are still valid but marked for removal in future Python versions.
So maybe downgrade your python to <3.10 or wait for the maintainers to update the header file and fix these warnings.
Hello,
I've tried adding matplotlib-cpp to my project as a sanity-checking tool but I've encountered a handful of errors when building. Specifically:
1>C:\Users\user\Source\repos\project\matplotlibcpp.h(174,9): error C4996: 'Py_SetProgramName': deprecated in 3.11 1>C:\Users\user\Source\repos\project\matplotlibcpp.h(182,9): error C4996: 'PySys_SetArgv': deprecated in 3.11 1>C:\Users\user\Source\repos\project\matplotlibcpp.h(354,10): error C2766: explicit specialization; 'matplotlibcpp::detail::select_npy_type<int64_t>' has already been defined 1>C:\Users\user\Source\repos\project\matplotlibcpp.h(345,10): message : see previous definition of 'select_npy_type<__int64>' 1>C:\Users\user\Source\repos\project\matplotlibcpp.h(356,10): error C2766: explicit specialization; 'matplotlibcpp::detail::select_npy_type<uint64_t>' has already been defined 1>C:\Users\user\Source\repos\project\matplotlibcpp.h(349,10): message : see previous definition of 'select_npy_type<unsigned __int64>'
I'm on Windows 10 using Visual Studio 2022 and, as you may have guessed, Python 3.11. Initially tried linking the relevant files manually, then again using vcpkg, with the error unsurprisingly persisting. I've resolved to just push my data into pyplot via fstream since that's probably less hassle than trying to solve this or change Python versions, but I figured I'd raise the issue.
The text was updated successfully, but these errors were encountered: