编译好的so文件一直导入失败,换成gcc 10编译解决问题。
No module named 'nearest_neighbors.lib.python.nearest_neighbors'
OSError: undefined symbol: _ZSt28__throw_bad_array_new_lengthv
安装 GCC 的10版本
sudo apt install gcc-10 g++-10
GCC 10设置为默认编译器
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10