【发布时间】:2021-03-26 08:25:12
【问题描述】:
您好,我正在尝试在 Arch 系统上安装库 matplotlib-cpp。这是我得到的:
[luca@luca-mb matplotlib-cpp-master]$ make
mkdir -p examples/build
g++ -o examples/build/lines3d examples/lines3d.cpp -I/usr/include/python3.9 -I/usr/include/python3.9 -I/home/luca/.local/lib/python3.9/site-packages/numpy/core/include -std=c++11 -Wno-conversion -L/usr/lib -lpython3.9 -lcrypt -lpthread -ldl -lutil -lm -lm
examples/lines3d.cpp: In function ‘int main()’:
examples/lines3d.cpp:24:33: error: no matching function for call to ‘plot3(std::vector<double>&, std::vector<double>&, std::vector<double>&, std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&)’
24 | plt::plot3(x, y, z, keywords);
| ^
In file included from examples/lines3d.cpp:1:
examples/../matplotlibcpp.h:586:6: note: candidate: ‘template<class Numeric> void matplotlibcpp::plot3(const std::vector<Numeric>&, const std::vector<Numeric>&, const std::vector<Numeric>&, long int, const std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&)’
586 | void plot3(const std::vector<Numeric> &x,
| ^~~~~
examples/../matplotlibcpp.h:586:6: note: template argument deduction/substitution failed:
examples/lines3d.cpp:24:25: note: cannot convert ‘keywords’ (type ‘std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >’) to type ‘long int’
24 | plt::plot3(x, y, z, keywords);
| ^~~~~~~~
make: *** [Makefile:38: examples/build/lines3d] Error 1
我已尝试为此安装所有必要的 python 库,但到目前为止还没有锁定。谁能看出问题出在哪里?
谢谢。
【问题讨论】:
标签: c++ matplotlib installation cmake