Ask Your Question
1

catkin build in Ubuntu 20.04 noetic?

asked 2020-05-24 10:41:19 -0500

lucasw gravatar image

updated 2020-05-24 12:39:44 -0500

I think the answer is in an issue linked below, and that catkin tools isn't ready for noetic yet, and I'll have to test and upgrade my packages using catkin_make.

sudo apt install python3-catkin-tools
...
The following packages have unmet dependencies:
 python3-catkin-tools : Depends: python3-trollius but it is not installable

Then:

sudo apt install python3-trollius
...
E: Package 'python3-trollius' has no installation candidate

Try pip instead:

sudo pip3 install -U catkin_tools
Collecting catkin_tools
  Downloading catkin_tools-0.4.5-py3-none-any.whl (379 kB)
     |████████████████████████████████| 379 kB 4.4 MB/s 
Requirement already satisfied, skipping upgrade: setuptools in /usr/lib/python3/dist-packages (from catkin_tools) (45.2.0)
Collecting osrf-pycommon>0.1.1
  Downloading osrf_pycommon-0.1.9-py3-none-any.whl (38 kB)
Collecting trollius
  Downloading trollius-2.1.post2.tar.gz (274 kB)
 |████████████████████████████████| 274 kB 24.9 MB/s 
Requirement already satisfied, skipping upgrade: catkin-pkg>0.2.9 in /usr/lib/python3/dist-packages (from catkin_tools) (0.4.20)
Requirement already satisfied, skipping upgrade: PyYAML in /usr/lib/python3/dist-packages (from catkin_tools) (5.3.1)
Requirement already satisfied, skipping upgrade: six in /usr/lib/python3/dist-packages (from trollius->catkin_tools) (1.14.0)
Building wheels for collected packages: trollius
  Building wheel for trollius (setup.py) ... done
  Created wheel for trollius: filename=trollius-2.1.post2-py3-none-any.whl size=122060 sha256=c84ada60b3e737fefbf018b65fc9889526a61e9d1fe663c76b1ebdeaed9adc45
  Stored in directory: /root/.cache/pip/wheels/f4/64/34/347c23c361a3e52dd29b82cbe7ca542769f85d9b7aef4f764c
Successfully built trollius

Installing collected packages: osrf-pycommon, trollius, catkin-tools
Successfully installed catkin-tools-0.4.5 osrf-pycommon-0.1.9 trollius-2.1.post2

The github issue mentions trollius should be replaced by asyncio, so seeing trollius above isn't encouraging.

~/catkin_ws$ catkin build
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

That leads to: https://github.com/catkin/catkin_tool... , then to https://github.com/catkin/catkin_tool...

edit retag flag offensive close merge delete

Comments

Then what I recommend in my comment should work for you as well.

I'll convert it to an answer.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-24 13:39:15 -0500 )edit

1 Answer

Sort by » oldest newest most voted
5

answered 2020-05-24 11:28:49 -0500

gvdhoorn gravatar image

updated 2020-05-24 13:40:22 -0500

Are you trying to do this on Ubuntu Focal or Bionic? If you "only" have Python 3, then I believe catkin/catkin_tools#597 should not matter: on Focal, catkin_tools would be running using Python 3, so that would be the same interpreter as it should use in the workspace itself. The issue describes a situation where there is a difference between the interpreter running catkin_tools vs the interpreter used in the workspace.

As to Trollius: there just hasn't been a release yet of catkin_tools with the PRs integrated which remove the dependency.

I'd suggest to try and install catkin_tools using pip, but from the repository (so not a released version):

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

This works for me.

Note: be sure to remove this work-around after a new release of catkin_tools has been cut. Otherwise you will run into issues later.

edit flag offensive delete link more

Comments

It's 20.04 focal (updated title)

lucasw gravatar image lucasw  ( 2020-05-24 12:41:09 -0500 )edit

It looks like the pip github install is no longer needed

pip3 uninstall catkin_tools
sudo apt install python3-catkin-tools
catkin build
lucasw gravatar image lucasw  ( 2020-06-06 09:48:58 -0500 )edit

This was recently fixed with the release of 0.7.0 afaik.

gvdhoorn gravatar image gvdhoorn  ( 2020-06-06 09:52:59 -0500 )edit

Looks like, as of today, there is still work going on to get 0.7.0 fully working in python3 IF you would like to install with sudo apt install python3-catkin-tools. That is, I am experiencing 'osrf-pycommon>0.1.1' distribution was not found if I install with sudo apt install python3-catkin-tools and try to run any catkincommands. See https://github.com/catkin/catkin_tool...

So as of today, seems working solution is still:

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

viktor.holova gravatar image viktor.holova  ( 2020-06-16 11:17:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-05-24 10:41:19 -0500

Seen: 451 times

Last updated: May 24