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

2024-04-27 10:59:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在努力建立一个帝国时代的克隆体,开始为它编写代码。但是,我在尝试运行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++

这里还有一个链接建筑物.md用于实际构建openage项目:https://github.com/SFTtech/openage/blob/master/building.md


Tags: cmakemodulesshareconfigureusrlocal错误find
2条回答

Python2.7已经有很多年的历史了(尽管仍然广泛使用),但是至少3.4版本已经过时了。升级Python(或者并行安装一个更新的版本),不要忘记相应的“-dev”包,这些包提供了所需的头和lib。在

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

$ sudo apt-get install python3

对我来说,在我安装python3和https://github.com/SFTtech/openage/blob/master/doc/building.md中列出的库之后,它就起作用了

相关问题 更多 >