ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Triggering pip requirements.txt from catkin build

asked 2015-11-24 14:27:08 -0500

CatherineH gravatar image

Is it possible to get catkin build to run pip install -r requirements.txt?

Some of the python package dependencies for my package are in version control systems, and because of this I think I need to use pip to install them instead of putting them in

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-11-24 19:26:18 -0500

William gravatar image

Conceptually this is not quite right. rosdep is the tool which should be used to install dependencies. You can add rosdep rules which resolve to pip installations (including directly from version control). You can have these rules locally or propose them for the rosdep database ( ).

You should run rosdep once to satisfy dependencies and then the build (catkin_make, catkin_make_isolated, or catkin build) should be called many times and therefore it shouldn't do any dependency resolution as part of the build.

edit flag offensive delete link more

answered 2015-11-25 08:51:30 -0500

CatherineH gravatar image

As William's answer states, rosdep is the way to go.

For example, I can replicate the call to pip by first creating a rosdep.yaml file in my directory with the contents:

    packages: [seaborn]
    packages: [vikit-py]
    alt_install_cmd: git+git://

Then, I modify my package.xml file to include:


Then, I created the file /etc/ros/rosdep/sources.list.d/40-my-list.list, which contains the line:

yaml file:///my-package-path/rosdep.yaml

Finally, I run:

rosdep update
rosdep install --from-path my-package-path
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-11-24 14:27:08 -0500

Seen: 2,270 times

Last updated: Nov 25 '15