1

I have Ubuntu 20.04 and I've just installed ROS noetic and catkin.

But each time I do catkin build and I have a list of errors and cannot proceed. Can you guys please help me solve this problem.

Traceback (most recent call last):
  File "/usr/local/bin/catkin", line 5, in <module>
    from catkin_tools.commands.catkin import main
  File "/usr/local/lib/python3.8/dist-packages/catkin_tools/commands/catkin.py", line 28, in <module>
    from catkin_tools.common import is_tty
  File "/usr/local/lib/python3.8/dist-packages/catkin_tools/common.py", line 23, in <module>
    import trollius as asyncio
  File "/usr/local/lib/python3.8/dist-packages/trollius/__init__.py", line 21, in <module>
    from .base_events import *
  File "/usr/local/lib/python3.8/dist-packages/trollius/base_events.py", line 42, in <module>
    from . import tasks
  File "/usr/local/lib/python3.8/dist-packages/trollius/tasks.py", line 565
    def async(coro_or_future, loop=None):
        ^
SyntaxError: invalid syntax
Xah Rah
  • 13
  • 4
  • This isn't a catkin issue. Your python file has a syntax error. Since this is an installed package it is most likely because you're using the wrong version of Python. What does your `CMakeLists.txt` and the surrounding lines in that file look like? – BTables Apr 25 '22 at 02:13
  • yes thank you... the problem was indeed with the python pkg... because i had 2 versions of python – Xah Rah Apr 28 '22 at 11:08

1 Answers1

2

apt and pip3 versions of catkin_tools are broken for noetic. Workaround is to install like this:

sudo pip3 install git+https://github.com/catkin/catkin_tools.git

Refer to; https://github.com/Rayman/ros-get/issues/95

fet.atas
  • 303
  • 2
  • 10