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
do you have Python 3 / Anaconda installed and configured that as the default Python interpreter?
How did you install ROS?
What is the output of
which python
,python --version
andls -al /opt/ros/melodic/lib/python2.7/dist-packages/rosmaster
?It would appear you don't have the
rosmaster
Python pkg.Could you try the following?
and tell us the output?