ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

ROS 1 and Python 2.7 End of Life

With Python 2.7 imminently nearing its official end of life in about 5 months, how does the ROS 1 community plan to address Python going forward? Many major projects are dropping support for Python 2.7 and this is starting to affect development, especially in the python-heavy deep learning area. Is the only official solution to transition to ROS2 and use Python3 or is there any effort to officially accommodate Python 3 in ROS 1?

My colleagues can offer more details, but we’ve committed to Python 3 support in ROS 1 Noetic in May 2020: Planning future ROS 1 distribution(s).


Is there a timeframe for the Noetic buildfarm?

In order to setup the buildfarm the target platform Ubuntu 20.04 needs to be available. Usually the first version is available a couple of weeks after the previous release. So I would guess around end of October.

1 Like

Is there any plan to update Melodic core packages to “officially support” Python3 or is Python3 support already pervasive in the core packages?

I am also interested in this, I have been trying to develop a package using Python 3 but it has been a little difficult with some important dependencies, like tf2_ros.

The short answer is no. We never change the targeted environment in an already released distro.

Since some platforms (like Arch and Gentoo) already use Python 3 the majority of the core is already working with Python 3. But there are certainly parts which don’t yet and have to be updated for Noetic.


If it helps at all, here’s a small Docker recipe for building ROS1 Python C extensions for Python 3 if they already support it: (geared towards Bazel on Ubuntu Bionic, but can be repurposed)