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

No module named "yaml"

asked 2012-03-20 13:55:40 -0500

Turcuivie gravatar image

updated 2013-10-07 04:38:41 -0500

joq gravatar image

I installed ROS on Ubuntu 11.10 using the complete desktop install from However, when I try to run roscore, I get the following error:

    `Traceback (most recent call last):
  File "/opt/ros/electric/ros/bin/roscore", line 34, in <module>
    from ros import roslaunch
  File "/opt/ros/electric/ros/core/roslib/src/ros/", line 57, in __getattr__
    return __import__(name)
  File "/opt/ros/electric/stacks/ros_comm/tools/roslaunch/src/roslaunch/", line 43, in <module>
    import roslaunch.param_dump
  File "/opt/ros/electric/stacks/ros_comm/tools/roslaunch/src/roslaunch/", line 43, in <module>
    import yaml
ImportError: No module named yaml`

I found someone with the same problem here:

I also tried to get the yaml package using, "sudo apt-get install build-essential python-yaml cmake subversion wget python-setuptools mercurial git-core", but terminal then says that python-yaml is already updated. How can I get this yaml module working properly?

edit retag flag offensive close merge delete


Can you just do python -c 'import yaml; print "success"'?

tfoote gravatar image tfoote  ( 2012-03-20 18:29:29 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-03-20 15:10:13 -0500

joq gravatar image

updated 2013-10-07 04:37:29 -0500

Looks like you do not have the python-yaml Ubuntu package.

It should be installed, as it is a core system dependency for ROS.

edit flag offensive delete link more


sudo apt-get install python-yaml doesnt work.

FuerteNewbie gravatar image FuerteNewbie  ( 2013-10-06 17:42:10 -0500 )edit

It comes with Ubuntu.

joq gravatar image joq  ( 2013-10-07 04:39:44 -0500 )edit

Question Tools


Asked: 2012-03-20 13:55:40 -0500

Seen: 6,518 times

Last updated: Oct 07 '13