Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ImportError: No module named rosmaster.master_api

Hi,

When I run command "roscore", I face with the following error:

Traceback (most recent call last): File "/opt/ros/melodic/bin/roscore", line 36, in <module> from rosmaster.master_api import NUM_WORKERS ImportError: No module named rosmaster.master_api

I am working with melodic Ros on ubuntu 18.04. would you please help me? what is the problem?

ImportError: No module named rosmaster.master_api

Hi,

When I run command "roscore", I face with the following error:

Traceback (most recent call last):
  File "/opt/ros/melodic/bin/roscore", line 36, in <module>
    from rosmaster.master_api import NUM_WORKERS
ImportError: No module named rosmaster.master_api

rosmaster.master_api

I am working with melodic Ros on ubuntu 18.04. would you please help me? what is the problem?

ImportError: No module named rosmaster.master_api

Hi,

When I run command "roscore", I face with the following error:

Traceback (most recent call last):
  File "/opt/ros/melodic/bin/roscore", line 36, in <module>
    from rosmaster.master_api import NUM_WORKERS
ImportError: No module named rosmaster.master_api

I am working with melodic Ros on ubuntu 18.04. would you please help me? what is the problem?


Edit: My default python is 2.7. I couldn't run this

from rosmaster.master_api import NUM_WORKERS

in Python 3 too.

I installed ROS by apt-get install ros-desktop-melodic-full.

ImportError: No module named rosmaster.master_api

Hi,

When I run command "roscore", I face with the following error:

Traceback (most recent call last):
  File "/opt/ros/melodic/bin/roscore", line 36, in <module>
    from rosmaster.master_api import NUM_WORKERS
ImportError: No module named rosmaster.master_api

I am working with melodic Ros on ubuntu 18.04. would you please help me? what is the problem?


Edit: My default python is 2.7. I couldn't run this

from rosmaster.master_api import NUM_WORKERS

in Python 3 too.

I installed ROS by apt-get install ros-desktop-melodic-full.


Edit 2: The answers are as follow:

$ which python
/usr/bin/python
$ python --version
Python 2.7.15rc1
$ ls -al /opt/ros/melodic/lib/python2.7/dist-packages/rosmaster
ls: cannot access '/opt/ros/melodic/lib/python2.7/dist-packages/rosmaster': No such file or directory

Thanks so much