question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

catkin_make fails with ImportError: No module named terminal_color

See original GitHub issue

After updating ROS packages via apt I am getting the following error when running catkin_make

$ catkin_make
Traceback (most recent call last):
  File "/opt/ros/kinetic/bin/catkin_make", line 13, in <module>
    from catkin.terminal_color import disable_ANSI_colors, fmt
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/terminal_color.py", line 2, in <module>
    from catkin_pkg.terminal_color import *  # noqa
ImportError: No module named terminal_color
$ apt show ros-kinetic-catkin
Package: ros-kinetic-catkin
Version: 0.7.14-0xenial-20180809-132632-0800
Priority: extra
Section: misc
Maintainer: Dirk Thomas <dthomas@osrfoundation.org>
Installed-Size: 608 kB
Depends: cmake, google-mock, libgtest-dev, python-catkin-pkg (>> 0.4.3), python-empy, python-nose
Homepage: http://www.ros.org/wiki/catkin
Download-Size: 112 kB
APT-Manual-Installed: no
APT-Sources: http://packages.ros.org/ros/ubuntu xenial/main amd64 Packages
Description: Low-level build system macros and infrastructure for ROS.

I have no other version of catkin on my system. I am running Ubuntu 16.04

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
wangxian4423commented, Oct 20, 2018

I meet the same qusetions after i use: sudo apt-get upgrade,the problem is like this:

Traceback (most recent call last):
  File "/opt/ros/kinetic/bin/catkin_make", line 13, in <module>
    from catkin.terminal_color import disable_ANSI_colors, fmt
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/terminal_color.py", line 2, in <module>
    from catkin_pkg.terminal_color import *  # noqa
ImportError: No module named terminal_color

and I finally fix it with this command: pip install --upgrade catkin_pkg_modules

and then I can catkin_make,no error happen

4reactions
shylentcommented, Sep 4, 2018

Well, you are totally right here and I am wrong. Indeed, I had a version of catkin_pkg installed via pip (nothing else catkin related though).

I’ve checked and here it is

$ python -c "import catkin_pkg; print(catkin_pkg.__file__)"
home-dir/.local/lib/python2.7/site-packages/catkin_pkg/__init__.pyc

After uninstalling it, everything went back to normal.

I am very sorry for wasting your time here. Thank you for your patience!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ROS kinetic: ImportError: No module named terminal_color #5
After updating ROS packages via apt commands, I am getting the following error when running catkin_make $ catkin_make Traceback (most recent ...
Read more >
ImportError: No module named terminal_color - ROS Answers ...
The Python module in question has recently been moved from catkin into catkin_pkg . It is actually in the Debian python-catkin-pkg-modules . Can ......
Read more >
Open Source Q&A Forum - RSS feed - ROS Answers
Hey, I'm trying to compile a rospackage, but I throws the following error: > ImportError: No module named rospkg I checked if it...
Read more >
ModuleNotFoundError: No module named 'catkin_pkg ...
TurtleBot 2i Catkin_Make gives: ModuleNotFoundError: No module named 'catkin_pkg.terminal_color' ... I am currently working with TurtleBot 2i, and ...
Read more >
No Module Named Termcolor In Ubuntu Linux - YouTube
Python Import Error ModuleNotFoundError : No Module Named Termcolor In Ubuntu LinuxTo Install Termcolor python library in your system, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found