ImportError: No module named roslaunch
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:
ROS_ROOT=/home/mdc/ros_base/install_isolated/share/ros
ROS_PACKAGE_PATH=/home/mdc/ros_base/src/ros_comm/rosbag:/home/mdc/ros_base/install_isolated/share:/home/mdc/ros/install_isolated/share:/home/mdc/ros/src
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
ROSLISP_PACKAGE_DIRECTORIES=/home/mdc/ros_base/devel_isolated/rosbag/share/common-lisp:/home/mdc/ros/devel/share/common-lisp
ROS_DISTRO=kinetic
PYTHONPATH=/home/mdc/ros_base/devel_isolated/rosbag/lib/python2.7/dist-packages:/home/mdc/ros_base/install_isolated/lib/python2.7/dist-packages:/home/mdc/ros/install_isolated/lib/python2.7/dist-packages
ROS_ETC_DIR=/home/mdc/ros_base/install_isolated/etc/ros
Also, I execute which roslaunch
and get the output as below:
/home/mdc/ros_base/install_isolated/bin/roslaunch
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?