ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Sometimes the rospkg is not installed in the above path. using the method of follow to find the exactly install path in your computer.

Firstly, use the command "pip install python-rospkg" to install rospkg, and you can also find the install path shown follow.

Secondly, edit your .bashrc, add two row as follows at the end of this file.

PYTHONPATH="${PYTHONPATH}:your rospkg install path"

export PYTHONPATH

Thirdly, open a new terminal, try the command as follows:

python

import rospkg

if show nothing, that means you have solved the problem.