ros安装 catkin_make失败 ImportError: “from catkin_pkg.package import parse_package“ failed: No module na

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
-
评论 4
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值