0

I have a ROS package that has dependencies on various python and ROS libraries. Is it possible to provide a script in python that can install conda, ros2 and other python packages? If possible could anyone please help me giving a template .py file on how I can install conda and other python packages using conda?

1

1 Answer 1

1

You can use os.system:

import os
cmd="""ls -l"""
os.system(cmd)

Sign up to request clarification or add additional context in comments.

1 Comment

hello, I am trying to install ROS2 (index.ros.org/doc/ros2/Installation/Crystal/…). With os.system("xxx") everything works but not commands including CHOOSE_ROS_DISTRO (3 commands in the above link). Why is that?

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.