ros安装 catkin_make失败 ImportError: “from catkin_pkg.package import parse_package” failed: No module named ‘catkin_pkg’
在ros安装时,运行到建立工作空间,然后编译catkin_make出错。
情况一:如果是你错误使用了Python3版本,那么就将编译命令由catkin_make改为
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python2
参考链接1
情况二:catkin_pkg的位置可能不在你的PYTHONPATH上,参考
参考链接2
我面临的是情况一,debug过程如下所示:
cxl@cxl-laptop:~/catkin_ws$ catkin_make
Base path: /home/cxl/catkin_ws
Source space: /home/cxl/catkin_ws/src
Build space: /home/cxl/catkin_ws/build
Devel space: /home/cxl/catkin_ws/devel
Install space: /home/cxl/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/cxl/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/cxl/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/melodic
-- This workspace overlays: /opt/ros/melodic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "2")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-

最低0.47元/天 解锁文章





