/Python/tree/tree/tree.cc: In function ‘std::string tree::{anonymous}::PyObjectToString(PyObject*)’:
/Python/tree/tree/tree.cc:86:19: error: ‘PyUnicode_AsUTF8’ was not declared in this scope; did you mean ‘PyUnicode_Type’?
86 | std::string s(PyUnicode_AsUTF8(str));
| ^~~~~~~~~~~~~~~~
| PyUnicode_Type
make[2]: *** [CMakeFiles/_tree.dir/build.make:76: CMakeFiles/_tree.dir/tree.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:128: CMakeFiles/_tree.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
When building tree locally I get the following error saying
PyUnicode_AsUTF8
was not declared in this scope; did you meanPyUnicode_Type
?.Environment information
Environment information
Ubuntu 20.04.3 LTS
Python 3.8.10
cmake version 3.22.1
b452e5c2743e7489b4ba7f16ecd51c516d7cd8e3