Cmake is not able to find Python-libraries

后端 未结 10 1539
太阳男子
太阳男子 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:19

    In case that might help, I found a workaround for a similar problem, looking at the cmake doc : https://cmake.org/cmake/help/v3.0/module/FindPythonLibs.html

    You must set two env vars for cmake to find coherent versions. Unfortunately this is not a generic solution...

    cmake -DPYTHON_LIBRARY=${HOME}/.pyenv/versions/3.8.0/lib/libpython3.8.a -DPYTHON_INCLUDE_DIR=${HOME}/.pyenv/versions/3.8.0/include/python3.8/ cern_root/
    

提交回复
热议问题