ROS with python virtual environment
I installed ROS noetic on my ubuntu machine using apt command. It uses root python installation (python3.8) like /usr/bin/python3
. All ROS related python modules like rospkg, rospy, cv_bridge
have been installed for this interpretor. Now, as I work on other big projects, I need to install many python modules and even different python versions. So, I use conda or python venv environment for that. How can I run those projects in ROS since it uses the root installation interpretor? If I activate a virtual env, the ROS node does not run and shows error like
ModuleNotFoundError: No module named "rospkg"
What is the best way to handle different python environments along with ROS?