"No module named rosbag" error
I followed guide at http://www.ros.org/doc/api/rosbag/html/c++/ I runned the example usage read bag file by Python,
import rosbag
bag = rosbag.Bag('test.bag')
for topic, msg, t in bag.read_messages('numbers'):
print msg.data
bag.close();
when i run the code it tells me "ImportError: No module named rosbag"
Traceback (most recent call last): File "/home/user/ros_workspace/beginner_tutorials/nodes/read_bag.py", line 4, in <module> import rosbag ImportError: No module named rosbag
please tell me how to fix this!