问题描述

安装cartographer_ros
运行catkin_make_isolated --install --use-ninja

ubuntu版本:20.04
ros版本:noetic

命令出现一下问题

CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find PythonInterp: Found unsuitable version "2.7.18", but
  required is at least "3" (found /usr/bin/python)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:391 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindPythonInterp.cmake:169 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /opt/ros/noetic/share/catkin/cmake/python.cmake:4 (find_package)
  /opt/ros/noetic/share/catkin/cmake/all.cmake:164 (include)
  /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:54 (find_package)

解决方案:

打开/catkin_ws/build_isolated/cartographer_ros下的CMakeCache.txt
勾选Advanced找到PYTHON_EXECUTABLE,更新为同路径下的Python3解决

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐