Python module dependenciesΒΆ

When your Python package imports other python modules, package.xml should provide a <run_depend> with the appropriate package name.

For system dependencies, like python-numpy or python-yaml, use the corresponding rosdep name:


These names are usually already defined in the rosdistro repository. If you need a module not yet defined there, please fork that repository and add them.

Several ROS infrastructure modules, like python-rospkg or python-rosdep itself, apply to multiple ROS releases and are released independently of them. Resolve those module dependencies like other system packages, using the rosdep name:


When you import from another ROS Python package, like rospy or roslaunch, always use the catkin package name:


ROS message or service definitions are similarly defined as modules by ROS packages like std_msgs and sensor_msgs, used as examples here. For them, use both <build_depend> and <run_depend> tags with the ROS package name:



Your CMakeLists.txt need not specify Python-only dependencies. They are resolved automatically via sys.path.