ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
In our projects we found a workaround for this problem. It is pretty easy to retain the Python interpreter which the ROS installation uses. There is ROS_PYTHON_VERSION
environmental variable defined in 1.ros_python_version.sh
file located inside your ROS installation. To change the version it is enough to run something like the following (in Ubuntu or inherited distributions):
sudo ROS_INSTALL_DIR=/otp/ros/melodic sed -i -e 's/ROS_PYTHON_VERSION=2/ROS_PYTHON_VERSION=3/' ${ROS_INSTALL_DIR}/etc/catkin/profile.d/1.ros_python_version.sh
If you installed ROS from sources it is highly recommended to recompile your Python/Cython dependent packages after retaining of used Python version.
2 | No.2 Revision |
In our projects we found a workaround for this problem. It is pretty easy to retain the Python interpreter which the ROS installation uses. There is ROS_PYTHON_VERSION
environmental variable defined in 1.ros_python_version.sh
file located inside your ROS installation. To change the version it is enough to run something like the following (in Ubuntu or inherited distributions):
sudo ROS_INSTALL_DIR=/otp/ros/melodic ROS_INSTALL_DIR=/opt/ros/melodic sed -i -e 's/ROS_PYTHON_VERSION=2/ROS_PYTHON_VERSION=3/' ${ROS_INSTALL_DIR}/etc/catkin/profile.d/1.ros_python_version.sh
If you installed ROS from sources it is highly recommended to recompile your Python/Cython dependent packages after retaining of used Python version.