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

beliavskij's profile - activity

2021-06-17 11:54:52 -0500 received badge  Self-Learner (source)
2021-06-17 11:54:52 -0500 received badge  Teacher (source)
2019-08-25 13:10:40 -0500 received badge  Famous Question (source)
2019-08-25 13:10:40 -0500 received badge  Notable Question (source)
2019-07-08 11:45:49 -0500 marked best answer ModuleNotFoundError: No module named 'yaml'

Hello!

I am only starting to learn ROS by attending Udemy course on it. Recently I have encountered a problem, when I try to run simple talker example using command:

rosrun ros_essentials_cpp talker.py

I receive an error:

    (base) ➜  catkin_ws rosrun ros_essentials_cpp talker.py
Traceback (most recent call last):
  File "/mnt/c/Users/daniu/Documents/Projects/ROS/catkin_ws/src/ros_essentials_cpp/src/topic01_basics/talker_listener/scripts/talker.py", line 3, in <module>
    import rospy
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/__init__.py", line 47, in <module>
    from std_msgs.msg import Header
  File "/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/__init__.py", line 1, in <module>
    from ._Bool import *
  File "/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/_Bool.py", line 5, in <module>
    import genpy
  File "/opt/ros/melodic/lib/python2.7/dist-packages/genpy/__init__.py", line 34, in <module>
    from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
  File "/opt/ros/melodic/lib/python2.7/dist-packages/genpy/message.py", line 44, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'

I tried to install yaml

python2.7 -m pip install pyyaml

Installation was successful, but it does not change anything

Previously I had no problems running ROS code (this talker.py too), but I have made a pause in my learning and after return, nothing is working

I am using WSL (Ubuntu 18.04 bionic)

Thank you for your help!

2019-07-08 11:42:06 -0500 received badge  Popular Question (source)
2019-07-08 11:38:17 -0500 answered a question ModuleNotFoundError: No module named 'yaml'

I have found a solution that helped, it is described in this answer Using source deactivate let my run the code Thank yo

2019-07-08 11:38:17 -0500 received badge  Rapid Responder (source)
2019-07-08 11:37:00 -0500 commented question ModuleNotFoundError: No module named 'yaml'

Yes, I have found a solution that helped, it is described in this answer Using souce deactivate let my run the code Than

2019-07-07 23:21:38 -0500 commented question ModuleNotFoundError: No module named 'yaml'

Yes, I do, I have an anaconda and my default Python is Python 3 (base) ➜ ~ python --version Python 3.7.1 (base) ➜ ~

2019-07-07 06:55:48 -0500 asked a question ModuleNotFoundError: No module named 'yaml'

ModuleNotFoundError: No module named 'yaml' Hello! I am only starting to learn ROS by attending Udemy course on it. Rec