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

Running rosrun in a virtual environment

asked 2022-12-09 10:32:18 -0500

AlgK gravatar image

Is there a way to tell rosrun to use a specific virtual environment? There's a question here about it, but no answers:

https://answers.ros.org/question/3675...

I'd imagine something along

rosrun my_package script.py --venv /path/to/environment

Otherwise, I'd have to install all modules I need in my OS's Python - is that really intended? Would be much nicer to keep things separate, especially when developing locally.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-12-15 20:34:57 -0500

Mike Scheutzow gravatar image

No, unless you know a lot about ros you can not easily use a virtual environment.

If you are using the binary ros repo for ros packages, exactly one python version is supported (python 3.8.10 for noetic.) Most of the ros python code is put in /opt/ros/, but a few standard python packages may be installed to /usr/lib/python3.8/.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-12-09 10:32:18 -0500

Seen: 149 times

Last updated: Dec 15 '22