Catkin troubles since recent apt-get update (ROS kinetic)

asked 2018-09-17 13:50:59 -0600

jannsta gravatar image

updated 2018-09-19 07:46:43 -0600

This issue started with the same symptoms as #q301702 - I had a working catkin environment and (I think) following $ apt-get update, catkin build started having problems with certain packages that had been stable for a long time - ImportError: No module named terminal_color being the error message.

Following advice from #q301702 I uninstalled the catkin_tools and catkin_pkg packages I must have previously installed with pip and then installed both packages according to their respective Docs pages with apt-get:

sudo apt-get install python-catkin-pkg (installs version (0.4.8-100)) sudo apt-get install python-catkin-tools (installs version (0.4.4-1))

Both seem to install OK but now when I run catkin commands as before (e.g. $ catkin build) I get catkin: command not found as though the package doesn't exist.

Are there some other environment variables I need to specify or something?

One other potentially related thing is that I can't uninstall "catkin" (0.7.14) itself with pip (error message when running pip uninstall catkin: The directory '/home/jan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Skipping catkin as it is not installed.) (according to ``pip freeze``` there is a module called catkin installed)

EDIT:

output to dpkg -L ros-kinetic-catkin:

/opt
/opt/ros
/opt/ros/kinetic
/opt/ros/kinetic/share
/opt/ros/kinetic/share/catkin
/opt/ros/kinetic/share/catkin/LICENSE
/opt/ros/kinetic/share/catkin/cmake
/opt/ros/kinetic/share/catkin/cmake/catkin_install_python.cmake
/opt/ros/kinetic/share/catkin/cmake/python.cmake
/opt/ros/kinetic/share/catkin/cmake/symlink_install
/opt/ros/kinetic/share/catkin/cmake/symlink_install/catkin_symlink_install.cmake.in
/opt/ros/kinetic/share/catkin/cmake/symlink_install/catkin_install_logic.cmake
/opt/ros/kinetic/share/catkin/cmake/symlink_install/catkin_symlink_install_programs.cmake
/opt/ros/kinetic/share/catkin/cmake/symlink_install/catkin_symlink_install_directory.cmake
/opt/ros/kinetic/share/catkin/cmake/symlink_install/install.cmake
/opt/ros/kinetic/share/catkin/cmake/symlink_install/catkin_symlink_install_targets.cmake
/opt/ros/kinetic/share/catkin/cmake/symlink_install/catkin_symlink_install_append_install_code.cmake
/opt/ros/kinetic/share/catkin/cmake/symlink_install/catkin_symlink_install_files.cmake
/opt/ros/kinetic/share/catkin/cmake/stamp.cmake
/opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake
/opt/ros/kinetic/share/catkin/cmake/find_program_required.cmake
/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py
/opt/ros/kinetic/share/catkin/cmake/catkin_symlink_install.cmake
/opt/ros/kinetic/share/catkin/cmake/atomic_configure_file.cmake
/opt/ros/kinetic/share/catkin/cmake/catkin_metapackage.cmake
/opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake
/opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake
/opt/ros/kinetic/share/catkin/cmake/templates
/opt/ros/kinetic/share/catkin/cmake/templates/Doxyfile.in
/opt/ros/kinetic/share/catkin/cmake/templates/env-hook.context.py.in
/opt/ros/kinetic/share/catkin/cmake/templates/env.bat.in
/opt/ros/kinetic/share/catkin/cmake/templates/python_distutils_install.sh.in
/opt/ros/kinetic/share/catkin/cmake/templates/__init__.py.in
/opt/ros/kinetic/share/catkin/cmake/templates/script.bash.in
/opt/ros/kinetic/share/catkin/cmake ...
(more)
edit retag flag offensive close merge delete

Comments

What does dpkg -L ros-kinetic-catkin output?

allenh1 gravatar image allenh1  ( 2018-09-17 15:19:46 -0600 )edit

What does python -c "import catkin_pkg; print(catkin_pkg.__file__)" output?

Dirk Thomas gravatar image Dirk Thomas  ( 2018-09-17 15:40:37 -0600 )edit

Thanks for the quick comments - have edited the question with this info.

jannsta gravatar image jannsta  ( 2018-09-18 03:55:08 -0600 )edit

One the one hand you claim you have install python-catkin-pkg but on the other it isn't being found. What does dpkg -l | grep catkin-pkg output? What does which python output?

Dirk Thomas gravatar image Dirk Thomas  ( 2018-09-18 11:01:20 -0600 )edit

Yeah - confused by this too! I'm relatively sure the package is installed by apt-get as if I try to reinstall the response is python-catkin-pkg is already the newest version (0.4.8-100).. Have added the responses to your suggested queries to the question. Thanks.

jannsta gravatar image jannsta  ( 2018-09-18 11:32:02 -0600 )edit

I am running out of ideas. Probably last one: ls -al /usr/bin/python?

Dirk Thomas gravatar image Dirk Thomas  ( 2018-09-18 13:41:11 -0600 )edit

Q updated. However, I also removed/reinstalled ros-kinetic-desktop-all, python-catkin-pkg, python-catkin-tools and now catkin tools seem to be OK (although can't yet test whether the initial issue (as in #q301702) is resolved)). Not sure where the problem came from but thanks for the suggestions!!

jannsta gravatar image jannsta  ( 2018-09-19 10:54:07 -0600 )edit