Ask Your Question

Find the python packages on which a ros package depends on

asked 2020-11-17 05:07:51 -0500

Sahithi gravatar image

Hi, I am new to ROS. I want to find the list of all python packages on which a ros package depends on. Is there any specific command to do so? For example, I would like to get the list of all python packages on which rospack depends on

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-11-17 10:56:40 -0500

sloretz gravatar image

There's a few ways to get a list of packages a ROS package depends on, but you may have to do some more work to figure out if they're a Python package.

If you just want to check first level dependencies online, you can look at the dependencies tab for the package on

If the ROS package is installable via apt, you can use apt depends ros-noetic-pkgname to get the first level of dependencies:

$ ros-noetic-rospack
  Depends: libboost-filesystem1.71.0
  Depends: libboost-program-options1.71.0
  Depends: libc6 (>= 2.14)
  Depends: libgcc-s1 (>= 3.0)
  Depends: libpython3.8 (>= 3.8.2)
  Depends: libstdc++6 (>= 5.2)
  Depends: libtinyxml2-6a (>= 5.0.0)
  Depends: libboost-filesystem-dev
  Depends: libboost-program-options-dev
  Depends: libboost-system-dev
  Depends: libtinyxml2-dev
  Depends: pkg-config
  Depends: python3-catkin-pkg-modules
  Depends: python3-dev
  Depends: python3-rosdep-modules
  Depends: ros-noetic-ros-environment

If you want to find all dependencies of it's dependencies, you can use the --recurse option

$ apt depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances ros-noetic-rospack
... lots of output ...

If you want to find all dependencies that depend on Python or Python 3, you can use py3-ready with the --target and --dot options, and then visualize that with graphviz.

py3-ready check-apt --dot --target python3 ros-noetic-rospack

image description

That can work with packages in a sourced catkin workspace too

py3-ready check-package --dot --target python3 my_ros_package
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools



Asked: 2020-11-17 05:07:51 -0500

Seen: 61 times

Last updated: Nov 17 '20