ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No ROS distribution officially supports Python 3. ROS Kinetic uses Qt 5 though, e.g. for rqt and rviz.

If you want to try it anyway you need to build everything from source (following the "normal" from source instructions). But before you will need to install all Python dependencies (e.g. catkin_pkg) for Python 3. Since the Debian packages are not side-by-side installable with the Python 2 version using a virtualenv will likely be the easiest way. The virtualenv will also ensure that python is pointing to a Python 3 interpreter. Otherwise you would need to pass a custom interpreter to the build (like -DPYTHON_EXECUTABLE=python3).

Anyway if you go that route you should expect problems and will find things which simply don't work with Python 3.

No ROS distribution officially supports Python 3. ROS Kinetic uses Qt 5 though, e.g. for rqt and rviz.

If you want to try it anyway you need to build everything from source (following the "normal" from source instructions). But before you will need to install all Python dependencies (e.g. catkin_pkg) for Python 3. Since the Debian packages are not side-by-side installable with the Python 2 version using a virtualenv will likely be the easiest way. The virtualenv will also ensure that python is pointing to a Python 3 interpreter. Otherwise you would need to pass a custom interpreter to the build (like -DPYTHON_EXECUTABLE=python3).

Anyway if you go that route you should expect problems and will find things which simply don't work with Python 3.

Update:

things are changing with the Noetic release coming up in less than a year. Please see the latest instructions in the wiki about the topic: http://wiki.ros.org/UsingPython3

No ROS distribution officially supports Python 3. ROS Kinetic uses Qt 5 though, e.g. for rqt and rviz.

If you want to try it anyway you need to build everything from source (following the "normal" from source instructions). But before you will need to install all Python dependencies (e.g. catkin_pkg) for Python 3. Since the Debian packages are not side-by-side installable with the Python 2 version using a virtualenv will likely be the easiest way. The virtualenv will also ensure that python is pointing to a Python 3 interpreter. Otherwise you would need to pass a custom interpreter to the build (like -DPYTHON_EXECUTABLE=python3).

Anyway if you go that route you should expect problems and will find things which simply don't work with Python 3.

Update:

things are changing with the Noetic release coming up in less than a year. year which does target Python 3. Please see the latest instructions in the wiki about the topic: http://wiki.ros.org/UsingPython3