0
$\begingroup$

Rosanswers logo

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 from rqt_gui.main import Main

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

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

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

File "/usr/lib/python2.7/dist-packages/yaml/init.py", line 2, in 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.


Originally posted by starcosmos on ROS Answers with karma: 23 on 2019-04-16

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by tfoote with karma: 58457 on 2019-05-05

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.