ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

ImportError: No module named roslaunch

asked 2018-03-12 06:18:55 -0500

bear234 gravatar image

I just installed ROS1 base version from source in the directory: /home/mdc/ros_base/.

To finish the installation, I executed source /home/mdc/ros_base/install_isolated/setup.bash.

Then I execute the command printenv | grep 'ROS\|PYTHONPATH' to check the environment variables of ROS and here is the output:


Also, I execute which roslaunch and get the output as below:


Now, my project is here: /home/mdc/catkin_ws/, so here is what I'm doing:

cd /home/mdc/catkin_ws
roslaunch ./src/mylaunch/launch/classic_mode.launch

But I get an error:

Traceback (most recent call last):
      File "/home/mdc/ros_base/install_isolated/bin/roslaunch", line 34, in <module>
        import roslaunch
    ImportError: No module named roslaunch

However, I checked the path: /home/mdc/ros_base/install_isolated/lib/python2.7/dist-packages, which has been set into PYTHONPATH as above and I saw there was a directory named roslaunch. I think this is exactly the module roslaunch, right? If so, why can't it find the module roslaunch?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-03-12 06:56:07 -0500

plz execute source /opt/ros/distro/setup.bash fristly

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-03-12 06:18:55 -0500

Seen: 679 times

Last updated: Mar 12 '18