ROS2报错:SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other...

18 篇文章 6 订阅

因为一直用c++,所以对ROS+python的调试相对较少,今天碰到一个用python玩的项目,发现报错,

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

然后,老套路,把ros2/example拉下来,测试一下rospy,

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

 

在python中试了一下,不行 

>>> print(setuptools.__version__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'setuptools' is not defined

然后,改了一点

>>> import setuptools
>>> print(setuptools.__version__)

59.6.0

那有可能是版本太新了。按照贴子里面提到的

pip install setuptools==58.2.0

问题解决。

本文结束。

  • 12
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值