thomas@thomas-virtual-machine:~/dev_ws$ colcon build
Starting >>> learning_interface
Starting >>> learning_cv
--- stderr: learning_cv
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
---
Finished <<< learning_cv [1.96s]
Starting >>> learning_gazebo
--- stderr: learning_gazebo
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
============
参考:
玩转ROS2的填坑之路-SetuptoolsDeprecationWarning: setup.py install is deprecated
解决方法——降档使用setuptools
构建程序时使用setup.py的方法已被弃用。该问题目前尚未解决
有个折中的处理方式。
换一个setuptools版本,选择与ROS2一起工作不产生任何warning的版本。
能满足这个条件的setuptools版本中,最新的是58.2.0。
$ sudo apt install python3-pip
$ pip install setuptools==58.2.0
在调用 colcon build 编译就通过了
赠品:如何查询setuptools的版本
thomas@thomas-virtual-machine:~/dev_ws$ python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import setuptools
>>> print(setuptools.__version__)
59.6.0
>>> quit()
thomas@thomas-virtual-machine:~/dev_ws$