Open genghaijian001 opened 3 months ago
I have encountered the same issue. First please try to check your current version of packaging
pip list | grep packaging
if the version of packaging is <22.0, please upgrade it to 22.0
pip install packaging==22.0
Then, remove log, build and install folders in the workspace and colcon build
again. Hope this can help you to fix this issue too.
@ba1Sta I got same error, your solution is solved my problem too, thanks.
I've never encountered this problem before. And I don't know how to solve it. Can anyone pls help me,thank you :) geng@geng-VirtualBox:~/ws_sensor_combined$ colcon build
Starting >>> px4_msgs
--- stderr: px4_msgs
Traceback (most recent call last):
File "/home/geng/ws_sensor_combined/build/px4_msgs/ament_cmake_python/px4_msgs/setup.py", line 4, in
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/init.py", line 108, in setup
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 310, in run
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 318, in find_sources
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 544, in run
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 610, in prune_file_list
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 266, in get_fullname
File "/home/geng/.local/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 284, in _distribution_fullname
TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
gmake[2]: *** [CMakeFiles/ament_cmake_python_build_px4_msgs_egg.dir/build.make:70: CMakeFiles/ament_cmake_python_build_px4_msgs_egg] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:447: CMakeFiles/ament_cmake_python_build_px4_msgs_egg.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
Failed <<< px4_msgs [11.3s, exited with code 2]
Summary: 0 packages finished [11.6s]
1 package failed: px4_msgs
1 package had stderr output: px4_msgs
1 package not processed