<div dir="ltr"><span id="docs-internal-guid-7d860429-4614-8dcd-7f43-2f85889ccfd7"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">tl;dr</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">- For Indigo Igloo, ROS will continue to use Python 2.7 (an update to REP 3 is under review [1](</span><a href="https://github.com/ros-infrastructure/rep/pull/64" style="text-decoration:none"><span style="font-size:15px;font-family:Arial;background-color:transparent;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">https://github.com/ros-infrastructure/rep/pull/64</span></a><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">)).  In some future distro, we will switch to Python 3.</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">- We recommend that developers make their code Python 2/3 compatible [2](</span><a href="http://wiki.ros.org/python_2_and_3_compatible_code" style="text-decoration:none"><span style="font-size:15px;font-family:Arial;background-color:transparent;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">http://wiki.ros.org/python_2_and_3_compatible_code</span></a><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">) to allow for a future transition to Python 3. </span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">- We recommend that developers test their code with Python 3.3 from source (to be supported in Indigo).</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br></span></p>

<p style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Long Form:</span></p>
<br>
<span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">In preparing for Indigo we have ported most of the core ROS libraries and tools to work with both Python 2 and Python 3.  This work is not difficult, but it is time-consuming and it requires good tests to make sure that it’s done correctly.  Because we don’t want to require everybody in the ROS community to go through this process immediately, we are going to stick with Python 2.7 for Indigo, instead of switching to Python 3, as we had previously discussed.</span></p>

<br><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">We considered various approaches to supporting both Python 2 and Python 3 in Indigo and have determined that it would effectively mean forking the distro and having two versions of Indigo, each containing a subset of the overall list of packages.  A large part of the value of a ROS distribution is that it specifies a common platform, with known versions of important dependencies, upon which everybody can depend.  We don’t want to lose that value by starting to split the ROS ecosystem into potentially incompatible islands.</span></p>

<br><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">So we’re staying with Python 2 for Indigo, which means, among other things, that: rosdep rules will continue to resolve to Python 2 packages and the Ubuntu .debs will be built with dependencies on Python 2 packages.</span></p>

<br><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Ubuntu has been very public about migrating the default desktop install forward to use Python 3, but their progress has been slow, and they will continue in Ubuntu Trusty to provide Python 2 packages in parallel with Python 3 packages as recommended by PEP 394.  We expect that Python 2 support in Ubuntu will continue beyond Trusty, as Python 2 and Python 3 are installable side by side and so much existing code works only with Python 2.</span></p>

<br><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">It will be necessary to migrate ROS forward to Python 3 at some point in the future. As such, we highly recommend that, when you are working on a package, make it Python 2 and Python 3 compatible. Here </span><a href="http://wiki.ros.org/python_2_and_3_compatible_code" style="text-decoration:none"><span style="font-size:15px;font-family:Arial;background-color:transparent;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">http://wiki.ros.org/python_2_and_3_compatible_code</span></a><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> is the list of common fixes to make your code 2/3 compatible. If you find yourself working on some Python code, go ahead and make it 2/3 compatible while you’re there.  It’s not hard and the effort now will serve you well in the future.</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br></span></p>

<p style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">If you have any questions or feedback please let us know. </span></p>

<p style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br></span></p><p style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">

<span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Tully</span></p><br><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">

<span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Other related links: </span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">

<a href="https://github.com/ros/rosdistro/issues/2427" style="text-decoration:none"><span style="font-size:15px;font-family:Arial;background-color:transparent;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">https://github.com/ros/rosdistro/issues/2427</span></a><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> ROS Core Python 3 migration issue</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><a href="https://wiki.ubuntu.com/Python/3" style="text-decoration:none"><span style="font-size:15px;font-family:Arial;background-color:transparent;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">https://wiki.ubuntu.com/Python/3</span></a><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> Ubuntu Python 3 Guide: No Python 2 by default on Ubuntu 14.04 LTS</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><a href="https://wiki.ubuntu.com/Python" style="text-decoration:none"><span style="font-size:15px;font-family:Arial;background-color:transparent;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">https://wiki.ubuntu.com/Python</span></a><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> Generic Ubuntu Python Overview</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><a href="http://www.python.org/dev/peps/pep-0394/" style="text-decoration:none"><span style="font-size:15px;font-family:Arial;background-color:transparent;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">http://www.python.org/dev/peps/pep-0394/</span></a><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> Python PEP: /usr/bin/python will always be Python 2</span></p>

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><a href="http://people.canonical.com/~ubuntu-archive/transitions/onlypy3oncd.html" style="text-decoration:none"><span style="font-size:15px;font-family:Arial;background-color:transparent;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">http://people.canonical.com/~ubuntu-archive/transitions/onlypy3oncd.html</span></a><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> Ubuntu core dependency burndown tracker: 9 out of 38 python3 supported</span></p>

<a href="http://wiki.ros.org/python_2_and_3_compatible_code" style="text-decoration:none"><span style="font-size:15px;font-family:Arial;background-color:transparent;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">http://wiki.ros.org/python_2_and_3_compatible_code</span></a><span style="font-size:15px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> Guide to migrating Python 2 code to be compatible with both Python 2 and Python 3</span></span><br>

</div>