Cmake is not able to find Python-libraries

后端 未结 10 1535
太阳男子
太阳男子 2020-12-02 16:53

Getting this error:

sudo: unable to resolve host coderw@ll
-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) 
CMake Error at /usr         


        
10条回答
  •  悲哀的现实
    2020-12-02 17:25

    Note that if you are using cMake version 3.12 or later, variable PythonInterp and PythonLibs has been changed into Python.

    So we use:

    find_package(Python ${PY_VERSION} REQUIRED)

    instead of:

    find_package(PythonInterp ${PY_VERSION} REQUIRED) find_package(PythonLibs ${PY_VERSION} REQUIRED)

    see https://cmake.org/cmake/help/v3.12/module/FindPython.html for details.

提交回复
热议问题