获取此错误:
sudo: unable to resolve host coderw@ll
-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108
(message):
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315
(_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-2.8/Modules/FindPythonInterp.cmake:139
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
Code/cmake/Modules/FindNumPy.cmake:10 (find_package)
CMakeLists.txt:114 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/coderwall/Desktop/rdkit/build/CMakeFiles/CMakeOutput.log".
See also "/home/coderwall/Desktop/rdkit/build/CMakeFiles/CMakeError.log".
我已经安装了:
python.h
的位置:/usr/lib/include/python2.7/python.h
python
库的定位:/usr/lib/python2.7/
如何解决这个问题?
发布于 2018-11-19 03:54:34
请注意,如果使用的是cMake版本3.12或更高版本,则变量PythonInterp
和PythonLibs
已更改为Python
。
所以我们用:
find_package(Python ${PY_VERSION} REQUIRED)
而不是:
find_package(PythonInterp ${PY_VERSION} REQUIRED)
find_package(PythonLibs ${PY_VERSION} REQUIRED)
详情请参见https://cmake.org/cmake/help/v3.12/module/FindPython.html。
https://stackoverflow.com/questions/24174394
复制相似问题