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/Tutorials/Using-Python-Packages/#installing-via-a-virtual-environment
Edit: Here's the most recent version of that tutorial, the old link doesn't work: https://docs.ros.org/en/jazzy/How-To-Guides/Using-Python-Packages.html
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.
Originally posted by jeferrandiz on ROS Answers with karma: 27 on 2021-02-04
Post score: 2
Original comments
Comment by bekirbostanci on 2021-02-04:
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
Comment by jeferrandiz on 2021-02-04:
Yes, I source the env as soon as I open a new console. I'll think to use anaconda too, thanks!