ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Why my ros-indigo have a conflict with anaconda3

asked 2019-04-16 06:17:23 -0500

starcosmos gravatar image

I am new for the ROS and I am learning the Tutorials.My system is Ubuntu14.04,and My ROS is ROS-INDIGO.And I have installed anaconda3 and python3.7.3.

$PATH:/opt/ros/indigo/bin:/home/hxy/anaconda3/bin:/home/hxy/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

$PYTHONPATH:/usr/lib/python2.7/dist-packages:/opt/ros/indigo/lib/python2.7/dist-packages

$ROS_PACKAGE_PATH:/home/hxy/tool/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks

In the "Understanding ROS Topics" chapter,it request me input the following command: rosrun rqt_graph rqt_graph

An error appears after that:

Traceback (most recent call last):

File "/opt/ros/indigo/lib/rqt_graph/rqt_graph", line 5, in <module> from rqt_gui.main import Main

File "/opt/ros/indigo/lib/python2.7/dist-packages/rqt_gui/main.py", line 38, in <module> import rospy

File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/__init__.py", line 49, in <module> from .client import spin, myargv, init_node, \

File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/client.py", line 47, in <module> import yaml

File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 2, in <module> from error import *

ModuleNotFoundError: No module named 'error'

So I have googled and find the reason:My anaconda3 have a confilict with my ROS. When I remove conda initialize in my .bashrc I can solve the error.

My question is :why they have a conflict?(I guess due to ROS's python version and the anaconda3's python version).

I have searched any question in answers.ros.If there is already an answer,I am sorry for my mistake.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-05-05 00:23:20 -0500

tfoote gravatar image

Anaconda provides alternative libraries and locations for which the ROS packages were not built against. It can be made to work but you will need to understand how anaconda is doing things differently than the default python installation from your system which the ROS packages are tested agained and make sure that you do everything necessary to provide the resources that the ROS packages are expecting.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-04-16 06:17:23 -0500

Seen: 162 times

Last updated: May 05 '19