Python更新后ros用不了的bug

一、原因

我同时安装了python2.7 和3.5,而且将python默认配置为python3.5,所以ros并不支持,所以提示找不到。

2.解决方式

通过修改不同版本的python的优先级,将python2.7设置为最高,即设置为默认python。

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 200 
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 100

猜你喜欢

转载自www.cnblogs.com/long5683/p/11105349.html
今日推荐