# Listing system dependencies from a package: "rospack depends" vs "rosdep keys"

**URL:** <https://discourse.openrobotics.org/t/listing-system-dependencies-from-a-package-rospack-depends-vs-rosdep-keys/41074>\
**Category:** ROS General\
**Tags:** rosdep, noetic\
**Created:** [December 13, 2024, 8:33pm UTC](https://discourse.openrobotics.org/t/listing-system-dependencies-from-a-package-rospack-depends-vs-rosdep-keys/41074 "2024-12-13T20:33:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![0xjairo](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/0xjairo/32/11912_2.png) [@0xjairo](https://discourse.openrobotics.org/u/0xjairo)\
**Post date:** [December 13, 2024, 8:33pm UTC](https://discourse.openrobotics.org/t/listing-system-dependencies-from-a-package-rospack-depends-vs-rosdep-keys/41074/1 "2024-12-13T20:33:02Z")

</div>

Cross-posting from [https://robotics.stackexchange.com/q/114003/37930](https://robotics.stackexchange.com/q/114003/37930)

* * *

I’m on ROS noetic (Ubuntu 20.04) and I’m trying to get a list of dependencies used by our system. For a given package, let’s say `my_can_pkg` which is compiled in my current catkin workspace, the list of dependencies output by `rospack depends` and `rosdep keys` (or `rosdep install -s`) is different.

As an example, here’s the output when I run `rospack depends my_can_pkg`:

```auto
catkin
genmsg
genpy
cpp_common
rostime
roscpp_traits
roscpp_serialization
message_runtime
gencpp
geneus
gennodejs
genlisp
message_generation
rosbuild
rosconsole
std_msgs
rosgraph_msgs
xmlrpcpp
roscpp
rosgraph
ros_environment
rospack
roslib
rospy

```

Here is the output when I run `rosdep keys my_can_pkg -i`:

```auto
python3-yapf-pip
python3-tabulate
python3-autoflake-pip
python3-isort-pip
python3-tqdm
python3-canmatrix
canopen-pip
python-attrs-pip

```

Why are the 2 sets of dependencies disjointed? Not a single dependency is common between the two lists, why is that?

EDIT: Here are the dependency declarations in the `package.xml` file

```xml
  <buildtool_depend>catkin</buildtool_depend>

  <depend>rospy</depend>
  <depend>canopen-pip</depend>
  <depend>python-attrs-pip</depend>
  <depend>python3-tqdm</depend>
  <depend>python3-tabulate</depend>
  <depend>python3-canmatrix</depend>
  <depend>python3-autoflake-pip</depend>
  <depend>python3-isort-pip</depend>
  <depend>python3-yapf-pip</depend>

```

---

<div class="post-metadata">

**Author:** ![tfoote](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/tfoote/32/3813_2.png) [@tfoote](https://discourse.openrobotics.org/u/tfoote)\
**Post date:** [December 13, 2024, 11:12pm UTC](https://discourse.openrobotics.org/t/listing-system-dependencies-from-a-package-rospack-depends-vs-rosdep-keys/41074/2 "2024-12-13T23:12:11Z")

</div>

Please don’t crosspost questions. [It’s considered poor etiquette](https://docs.ros.org/en/rolling/Contact.html#etiquette). Robotics Stack Exchange is the right place to ask questions.

---

<div class="post-metadata">

**Author:** ![tfoote](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/tfoote/32/3813_2.png) [@tfoote](https://discourse.openrobotics.org/u/tfoote)\
**Post date:** [December 13, 2024, 11:12pm UTC](https://discourse.openrobotics.org/t/listing-system-dependencies-from-a-package-rospack-depends-vs-rosdep-keys/41074/3 "2024-12-13T23:12:21Z")

</div>


