【问题标题】:Could NOT find PythonLibs (asking for 3.3 but I have 2.7.6)找不到 PythonLibs(要求 3.3 但我有 2.7.6)
【发布时间】:2014-10-28 05:42:25
【问题描述】:

我正在努力构建刚刚发布的帝国时代克隆,并开始为其编写代码。但是,我在尝试运行配置时不断收到此错误:

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 的链接,用于实际构建 openage 项目:https://github.com/SFTtech/openage/blob/master/building.md

【问题讨论】:

    标签: python c++ cmake homebrew


    【解决方案1】:

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

    $ sudo apt-get install python3
    

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

    【讨论】:

      【解决方案2】:

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

      【讨论】:

        猜你喜欢
        • 2017-11-19
        • 2021-02-05
        • 2015-08-08
        • 1970-01-01
        • 2018-12-30
        • 1970-01-01
        • 2020-06-22
        • 1970-01-01
        • 2016-08-30
        相关资源
        最近更新 更多