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)


output to dpkg -L ros-kinetic-catkin:

/opt/ros/kinetic/share/catkin/cmake ...
edit retag flag offensive close merge delete


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