Your submission was sent successfully! Close

You have successfully unsubscribed! Close

PSA for ROS users: Some things to know as Python 2 approaches EOL

Kyle Fazzari

on 28 October 2019

This article is more than 3 years old.


We recently got an interesting question from a customer, and I think the answer might be helpful to a wider audience. Python 2 will reach end of life in two months. This shouldn’t be news to anyone who hasn’t been living under a rock, and plans are in place to use Python 3 in Noetic (whereas ROS 2 has always used Python 3). However, the question from our customer was this: What does that mean for existing ROS 1 distributions (Kinetic and Melodic)? They are still using (and will continue to use) Python 2.

The answer really depends on where you’re getting Python 2. Tl;dr: If you’re using Ubuntu Xenial (16.04) or Bionic (18.04), please know that Python 2 from the Ubuntu repositories will continue to be supported for the lifetime of the Ubuntu release, regardless of Python 2’s upstream support status.

Ubuntu’s package repositories are split into a number of components: main, restricted, universe, and multiverse. You can read that link to learn all about them, but let me briefly quote it so you can understand the difference between main and universe:

main:

The main component contains applications that are free software, can be freely redistributed and are fully supported by the Ubuntu team. […] When you install software from the main component, you are assured that the software will come with security updates and that commercial technical support is available from Canonical.

universe:

The universe component is a snapshot of the free, open-source, and Linux world. […] Canonical does not provide a guarantee of regular security updates for software in the universe component, but will provide these where they are made available by the community.

All Ubuntu releases prior to Eoan (19.10) included Python 2 in main. In Eoan it was demoted to universe. This means that for Xenial (16.04) and Bionic (18.04), Python 2 falls under the main guarantees quoted above. It will continue to be fully-supported and receive free security updates.

In other words, as long as you’re running Kinetic or Melodic against its recommended Ubuntu release targets, you should be golden.

We’re having a discussion about this in the ROS forum if you’d like to participate.

This article originally appeared on Kyle Fazzari’s blog.

Talk to us today

Interested in running Ubuntu in your organisation?

Newsletter signup

Select topics you're
interested in

In submitting this form, I confirm that I have read and agree to Canonical's Privacy Notice and Privacy Policy.

Are you building a robot on top of Ubuntu and looking for a partner? Talk to us!

Contact Us

Related posts

ROS development on Linux, Windows and macOS

Historically ROS has been developed on top of Ubuntu, relying on the distribution as a stable base providing tools (like GCC, CMake, Python to name a few) and...

Optimise your ROS snap – Part 6

Welcome to Part 6 of our “Optimise your ROS snap” blog series. Make sure to check Part 5. This sixth and final part will  summarise every optimisation that we...

Optimise your ROS snap – Part 5

Welcome to Part 5 of our “Optimise your ROS snap” blog series. Make sure to check Part 4. This fifth part is going to cover two different optimisations. The...