执行 sudo rosdep init 出错
在执行 sudo rosdep init
报错 command rosdep not found
解决方法
安装python-rosdep
sudo apt install python-rosdep
安装完成后,执行sudo rosdep init
发现还存在问题
pkg_resources.DistributionNotFound: The ‘rosdep==0.19.0’ distribution was not found and is required by the application
这是由于ROS默认是python2,而自己系统python版本换到了python3造成的。
我们将系统python版本换到python2就可以了。
执行命令
sudo update-alternatives --config python
然后输入相应版本编号即可。
此时,再次执行 sudo rosdep init 成功