找不到PythonLibs(要求3.3但我有2.7.6)

时间:2014-10-28 05:42:26

标签: python c++ cmake homebrew

我正努力建立刚刚离开的帝国克隆时代,开始为它编写代码。但是,在尝试运行configure时,我一直收到此错误:

CMake Error at /usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:136 (message): Could NOT find PythonLibs: Found unsuitable version "2.7.6", but required is at least "3.3" (found PYTHON_LIBRARY-NOTFOUND) Call Stack (most recent call first): /usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:341 (_FPHSA_FAILURE_MESSAGE) /usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/FindPythonLibs.cmake:197 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) cpp/CMakeLists.txt:74 (find_package)

我收到错误之前运行的命令是:

./configure --mode=debug --cpp-compiler=clang++

此处还有关于实际构建开放项目的building.md的链接:https://github.com/SFTtech/openage/blob/master/building.md

2 个答案:

答案 0 :(得分:1)

您可能需要下载并安装Python3:

$ sudo apt-get install python3

对我而言,在安装了python3和https://github.com/SFTtech/openage/blob/master/doc/building.md

中列出的库后,它才有效

答案 1 :(得分:0)

Python 2.7已经存在很多年了(尽管仍然被广泛使用),但至少3.4版已经出版了。升级Python(或并行安装新版本)并且不要忘记提供所需头文件和库的相应“-dev”包。