ROS 2 colcon build报错SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip

我们在ROS 2 中使用colcon build时,出现以下问题

SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.

我们可以尝试运行构建完毕的程序,是否能正常执行(或者我们可以使用以下指令把ROS2/examples 拉下来测试一下)

git clone -b humble --recursive https://github.com/ros2/examples.git  src

依旧colcon build ,依旧出现这样的警告,既然官方提供的源码都出现警告,那就估计是python安装包版本的问题了,python3.8.3是官方指定的,不太可能有问题。顺着这个线索,找到了这个贴子

SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. - ROS Answers: Open Source Q&A Forum

按照帖子提示,可能是我们的版本过于新了,将我们的setuptools版本降下来就可以解决。

pip install setuptools==58.2.0

 接着我们查看一下我们的版本是否已经更换,执行以下指令

python3 

import setuptools

print(setuptools.__version__)

 版本更新后,我们再次尝试colcon build,

 我们可以看到问题解决。

  • 11
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值