0
$\begingroup$

Rosanswers logo

When building ROS2 BB from source I get the following ImportError:

--- stderr: uncrustify_vendor                                         
ImportError: 'from ament_package import parse_package_string' failed: cannot import name 'parse_package_string'
Make sure that you have installed 'ament_package', it is up to date and on the PYTHONPATH.

Is there missing something in the wiki.ros2.org install from source instructions? Or is this related to another problem specific to my OS setup?


Originally posted by thinwybk on ROS Answers with karma: 468 on 2018-07-07

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It looks like you are using an outdated version of the code. There are no package in Bouncy that still uses ament_package to parse package.xml files. Now the package parsing is done using catkin_pkg. As a consequence the parse_package_string function has been removed from ament_package

Can you make sure to download the Bouncy version of the code for all repositories?

I recommend doing it in an empty workspace to make sure you don't have any legacy Ardent repositories in your workspace.

You can do so by running:

mkdir -p bouncy_ws/src
wget https://raw.githubusercontent.com/ros2/ros2/release-latest/ros2.repos
vcs import src < ros2.repos

Originally posted by marguedas with karma: 3606 on 2018-07-07

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by thinwybk on 2018-07-09:
Thx for letting me know. I have setup ROS2 Bouncy on Ubuntu 18.04 via deb packages yesterday which seems to be the best fit for playing around with both, ROS2 Bouncy and ROS1 Melodic. I will not try out the "install from source" variant again but I guess the solution would have fix the issue.

$\endgroup$

Your Answer

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