0
$\begingroup$

Rosanswers logo

Hello everyone, I updated ubuntu from 18.04 version to 20.04 version and consequently I installed ros noetic.

The problem is: I must install some files running a .sh file, one of these files is python-catkin-tools, but I read that ros noetic doesn't work with python 2, so in the .sh file I changed that line with python3-catkin-tools, but when the script is running, it stops with this error:

pkg_resources.DistributionNotFound: The 'osrf-pycommon>0.1.1' distribution was not found and is required by catkin-tools.

If it can help you with the answer, the last line of .sh file is "catkin build"

Is there a fix with which I can avoid this error? Or I must reinstall ubuntu 18.04 with ros melodic?


Originally posted by Davide_970 on ROS Answers with karma: 81 on 2020-06-21

Post score: 7


Original comments

Comment by Davide_970 on 2020-06-22:
Thanks I'll try

Comment by Davide_970 on 2020-06-22:
Ok I installed catkin_tools with

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

But now the error is:

catkin: command not found

I also tried with "catkin_make" instead "catkin build", but it's the same problem

Comment by gvdhoorn on 2020-06-22:
Try opening a new shell/terminal.

Note: this is no longer really a ROS/Catkin problem, as installing packages using pip into your $HOME with --user is normal practice with pip.

Comment by Davide_970 on 2020-06-22:
I tried with a new terminal but it's the same...

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Please see catkin/catkin_tools#594. This is a known issue.

And see #q353113 for a work-around (note: this is really a work-around, not a fix).


Originally posted by gvdhoorn with karma: 86574 on 2020-06-22

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$
0
$\begingroup$

Rosanswers logo

This suggestion solved the issue for me: https://github.com/catkin/catkin_tools/issues/594#issuecomment-651938327

I installed python3-catkin-tools and then :

sudo apt install python3-catkin-lint python3-pip
pip3 install osrf-pycommon

Originally posted by azazdeaz with karma: 121 on 2020-07-27

This answer was NOT ACCEPTED on the original site

Post score: 11


Original comments

Comment by onlynithin on 2021-05-01:
This worked for me! Thanks a ton !

Comment by gvdhoorn on 2021-07-14:
This answer is popular, as we can see from the upvotes, but for future readers: please be aware that installing system dependencies using pip3 is not recommended on systems with package managers (such as Ubuntu, Debian, Fedora, etc).

An immediate disadvantage is that you won't be notified of updates. This will easily create situations where your pip3 installed version of osrf-pycommon starts to get out-of-date and (for instance) catkin_tools becoming incompatible with it. ROS Answers is full of Q&As which deal with the fall-out of people using pip to install such dependencies.

The apt version, which you can install just as easily, see #q353113, does not have that problem.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.