“FindPython3.cmake“找不到的解决方案

在cmake中常见以下错误:

  By not providing "FindPython3.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Python3", but
  CMake did not find one.

  Could not find a package configuration file provided by "Python3" with any
  of the following names:

    Python3Config.cmake
    python3-config.cmake

在确保find_package指令没写错的情况下(find_package(Python3 COMPONENTS Interpreter Development REQUIRED),检查一下cmake版本,cmake版本要在3.12以上才支持。

如果不懂如何更新cmake,可以参考这个:
cmake更新方法

上一篇:Java-Servlet-web-Maven依赖导入


下一篇:springboot项目打war包,并部署到tomcat