(anaconda3的原因)ros无法使用python2.7

目录

    • 问题
    • 原因:anaconda
    • update-alternatives
    • conda和ros的共存

问题

我想使用ros的tf查看功能,但是报错

Please use the package local script inside tf not the global one, this is deprecated.
Running [rosrun tf view_frames] for you
[rosrun] Couldn't find executable named view_frames below /opt/ros/kinetic/share/tf

原因:anaconda

anaconda自带一个python3.7,对此我使用apt-get remove是删除不了的,具体方法可以参考这个链接

update-alternatives

通过update-alternatives可以选择当前使用的python版本,但是因为我的python3.7是conda自带的,所以不受update-alternatives控制。

$ update-alternatives --list python
$ sudo update-alternatives --config python 

conda和ros的共存

按照我之前的经历,是可以共存的,但目前我只需要ros,所以不去花时间配置。留坑。

你可能感兴趣的:((anaconda3的原因)ros无法使用python2.7)