Skip to content Skip to sidebar Skip to footer

Modulenotfounderror: No Module Named 'rosbag' With Pip

I am trying to install rosbag using pip: pip install python-rosbag But I am getting the following error: (base) C:\Users\santhoshe.e\annotator-master>pip install python-rosba

Solution 1:

pyrosbag is actually a different package from rosbag.

The right way should be

conda install -c conda-forge ros-rosbag 

After that, you can run import rosbag in Python.

Solution 2:

I think it should be this:

pip install pyrosbag

Solution 3:

Try this to install pyrosbag using pip:

pip install pyrosbag

Now in the docs, the Usage page shows the import command as:

import pyrosbag

Solution 4:

Actually for rosbag, it is not very easy to install by using pip.

However you can use installation steps defined in ROS wiki.

But it is not done after installing rosbag, you should also add PYTHONPATH for the rosbag in your interpreter. Which can be done by simply selecting File>Settings>Project Interpreter and click the gear right next to your interpreter.

After that you will see two options : Add/ShowAll. Go with Show All and on the window that opened, on the right hand side, you will see +,-,..., a symbol that shows the paths for the selected interpreter (the symbol listed at the end)

Under these paths you should also define the path that you installed ros. For me, the path is :

/opt/ros/melodic/lib/python2.7/dist-packages

Post a Comment for "Modulenotfounderror: No Module Named 'rosbag' With Pip"