Error when running rqt_graph. No module named "error"
I'm running my model on ROS melodic.
Followed this tutorial to watch my dynamic graph of topics and nodes: http://wiki.ros.org/ROS/Tutorials/Und...
when I run rosrun rqt_graph rqt_graph I get an error:
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/launcher.py", line 42, in <module>
import rospkg
ModuleNotFoundError: No module named 'rospkg'
In order to fix it I changed my PYTHONPATH as it suggested to do in this issue: https://answers.ros.org/question/2432... (But I don't use anaconda though)
Then I got another error:
File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 2, in <module>
from error import *
ModuleNotFoundError: No module named 'error'
How can I fix that?
EDIT: I figured out that it is related to python version, I use python3.7.6 What version should I use instead? I tried 2.7.13 and it did not help
If you use Python 3 you should install the Debian package
python3-rospkg-modules
. But note: ROS Melodic does not officially support Python 3 but only Python 2.7. When using Python 2.7 you should have the Debian packagepython-rospkg
installed.