How to use (python) virtual environments with ROS2?
Hello, I am trying to run a python node which has imported some dependencies installed in a python virtual environment (using virtualenv). I have followed this tutorial: https://index.ros.org/doc/ros2/Tutori...
The problem is that when I run the node, I have an import error ModuleNotFoundError, related to the packages installed in the virtual environment.
I have rclpy on the default system python. I do not know what further info I can add to help. Has any of you managed to work this out and have a nice python environment? Thank you for your help.
Are you sure virtual env python activated? After the open a new console you have to set virtual env source. Also I tried with anaconda and it worked
Yes, I source the env as soon as I open a new console. I'll think to use anaconda too, thanks!