anaconda 和 ROS的python环境发生冲突的解决方式

装了anaconda之后的某一天我要新建一个ros工作空间,结果居然报错:

ImportError: "from catkin_pkg.package import parse_package" failed: No module named 'catkin_pkg'
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.

而且在终端显示的这段错误之上还有这么一条信息:

Using Python nosetests: /home/ubuntu/temp/anaconda3/bin/nosetests

what?!反正我是看不懂,不过可以确定的是ROS和anaconda掐起来了。通过不懈地搜索,我终于找到了解决方案:

(1)到home目录下ctrl+h,打开.bashrc,注释或者删除关于ananconda的部分。

(2)重新打开一个终端,ROS就会又正常了!!!!

猜你喜欢

转载自blog.csdn.net/weixin_39123145/article/details/83861480