gpt4 book ai didi

未找到 CMAKE 中的 Python_LIBRARIES

转载 作者:行者123 更新时间:2023-12-03 20:19:14 25 4
gpt4 key购买 nike

我安装了 Qt5 和 python 以使用它来使用 CMAKE 编译 Sigil。

首先我遇到了 qt5 的问题,但我解决了设置 CMAKE_PREFIX_PATH 的问题。
但是 Python 似乎对 pythonlibs 和 PYTHON_LIBRARIES 有问题。

首先它用黑色字母写着:

Looking for python version '3.4' by checking executables: python;python3;python3.4.
Found executable C:/Users/usuario pc/AppData/Local/Programs/Python/Python35-32/python.exe with UNsuitable version 3.5.2
Looking for python version '3.5' by checking executables: python;python3;python3.5.
Found executable C:/Users/usuario pc/AppData/Local/Programs/Python/Python35-32/python.exe with suitable version 3.5.2
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES) (found suitable version "3.5.2", minimum required is "3.4")

最后用红字写着:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.  
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_LIBRARY (ADVANCED)
linked by target "Sigil" in directory D:/Archivos de Programa/Sigil-0.9.6/src

我必须重新安装python吗? (我做了并重新启动了PC)。我必须改变任何线路吗?

谢谢。

最佳答案

首先安装 python-dev 或 python3-dev 使用

sudo apt-get install python-dev

或者
sudo apt-get install python3-dev

然后添加 -D PYTHON_LIBRARIES=<where that libpython<version>m.so is located there>作为 cmake 命令的参数

关于未找到 CMAKE 中的 Python_LIBRARIES,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38842019/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com