How to troubleshoot error during tutorial " could not find python module 'rosdep2.rospack'"

asked 2019-12-11 06:59:09 -0600

fgfanta gravatar image

While following the tutorial, I get an error every time I run rospack depends or rospack depends1:

~> rospack depends1 rospy
ImportError: No module named rosdep2.rospack
ImportError: No module named rosdep2.rospack
[rospack] Error: could not find python module 'rosdep2.rospack'. is rosdep up-to-date (at least 0.10.4)?

The problem started after Ubuntu installed some updates, including updates for ros-melodic. I am pasting the log with the list of updates at the bottom of this post.

To try and fix it I have re-installed python-rosdep, run again sudo rosdep init and rosdep update, but no change.

Running Melodic under Ubuntu 18.04, on a x86 PC.

Here the rosdep I have installed

~> sudo apt list --installed | grep rosdep

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

python-rosdep/bionic,bionic,now 0.18.0-1 all [installed]
python-rosdep-modules/bionic,bionic,now 0.18.0-1 all [installed,automatic]

And the environment

~> env | grep ROS
ROS_ETC_DIR=/opt/ros/melodic/etc/ros
ROS_ROOT=/opt/ros/melodic/share/ros
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
ROS_PYTHON_VERSION=2
ROS_PACKAGE_PATH=/home/fanta/workspace/robotics_lab/src:/opt/ros/melodic/share
ROSLISP_PACKAGE_DIRECTORIES=/home/fanta/workspace/robotics_lab/devel/share/common-lisp
ROS_DISTRO=melodic

Here the list of updates applied before the problem started:

Start-Date: 2019-12-11 12:06:43 Commandline: aptdaemon role='role-commit-packages' sender=':1.133' Upgrade: ros-melodic-qt-gui-cpp:amd64 (0.3.15-1bionic.20191023.174305, 0.3.16-1bionic.20191205.001935), ros-melodic-rqt-runtime-monitor:amd64 (0.5.7-0bionic.20191023.174233, 0.5.7-0bionic.20191205.001357), ros-melodic-voxel-grid:amd64 (1.16.2-0bionic.20191008.165335, 1.16.3-1bionic.20191120.164956), ros-melodic-diff-drive-controller:amd64 (0.15.0-0bionic.20191008.202822, 0.15.0-0bionic.20191127.153015), ros-melodic-carrot-planner:amd64 (1.16.2-0bionic.20191008.212102, 1.16.3-1bionic.20191120.171202), ros-melodic-simulators:amd64 (1.4.1-0bionic.20191109.020208, 1.4.1-0bionic.20191205.003437), ros-melodic-control-toolbox:amd64 (1.17.0-0bionic.20191008.201417, 1.17.0-0bionic.20191127.153625), ros-melodic-gazebo-ros-control:amd64 (2.8.4-0bionic.20191008.205320, 2.8.4-0bionic.20191127.154941), ros-melodic-robot:amd64 (1.4.1-0bionic.20191109.020035, 1.4.1-0bionic.20191127.152703), ros-melodic-rviz:amd64 (1.13.5-1bionic.20191008.205203, 1.13.6-1bionic.20191125.133538), ros-melodic-librviz-tutorial:amd64 (0.10.3-0bionic.20191008.212608, 0.10.3-0bionic.20191125.142053), ros-melodic-rotate-recovery:amd64 (1.16.2-0bionic.20191008.212138, 1.16.3-1bionic.20191120.171208), libssh-4:amd64 (0.8.0~20170825.94fa1e38-1ubuntu0.2, 0.8.0~20170825.94fa1e38-1ubuntu0.5), ros-melodic-rqt-py-console:amd64 (0.4.8-0bionic.20191023.174341, 0.4.8-0bionic.20191205.001350), libwbclient0:amd64 (2:4.7.6+dfsg~ubuntu-0ubuntu2.13, 2:4.7.6+dfsg~ubuntu-0ubuntu2.14), git-man:amd64 (1:2.17.1-1ubuntu0.4, 1:2.17.1-1ubuntu0.5), ros-melodic-rqt-image-view:amd64 (0.4.13-0bionic.20191023.175528, 0.4.13-0bionic.20191205.002903), ros-melodic-desktop:amd64 (1.4.1-0bionic.20191109.020203, 1.4.1-0bionic.20191205.003520), ros-melodic-visualization-tutorials:amd64 (0.10.3-0bionic.20191008.213608, 0.10.3-0bionic.20191125.143834), ros-melodic-rqt-service-caller:amd64 (0.4.8-0bionic.20191023.174254, 0.4.8-0bionic.20191205.001639), ros-melodic-rqt-publisher:amd64 (0.4.8-0bionic.20191023.174258, 0.4.8-0bionic.20191205.001500), ros-melodic-rviz-python-tutorial:amd64 (0.10.3-0bionic.20191008.212642, 0.10.3-0bionic.20191125.142722), ros-melodic-rqt-topic:amd64 (0.4.10-0bionic.20191023 ...

(more)
edit retag flag offensive close merge delete