我在执行了
sudo apt remove python3-colcon-common-extensions

sudo apt remove python3-colcon-core
命令后,
可以正常编译并且不会再报错了