网上找了很久没找到,最后自己搞出来了,亲测可用!分享给大家
报错如下:
Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set "pybind11_DIR" to a directory containing one of the above files. If "pybind11" provides a separate development package or SDK, be sure it has been installed.
解决办法:
如果你之前pip install pybind11过。那么在命令行通过该命令找到pybind11
的CMake配置文件的路径
python -m pybind11 --cmakedir
像这样
然后将这一行复制粘贴进这里
原本是pybind11_dir not found
然后点击configure,再点击generate就可以了。