Ask Your Question
0

Using ROS Melodic with Python 3

asked 2020-04-01 06:59:55 -0500

updated 2020-04-01 08:50:40 -0500

I'm trying to install ROS M following the installation instructions,. I installed the desktop configuration, but when tried step 1.6, rosdep installation, it doesn't work for python3-rosdep. Is this the right way of doing it?

I'm using Ubuntu 18.04

$ sudo apt install python3-rosdep
[sudo] password for user: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-rosdep : Depends: python3-catkin-pkg but it is not going to be installed
                  Depends: python3-rosdistro but it is not going to be installed
                  Depends: python3-rospkg but it is not going to be installed
                  Depends: python3-rosdep-modules (>= 0.18.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

EDIT:

If I try to install python3-rospkg it will attempt to remove a lot of ros-* packages I just installed

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-04-01 11:48:16 -0500

gvdhoorn gravatar image

The binary packages provided by the buildfarm target Python 2 for ROS Melodic. Melodic does not support Python 3 out-of-the-box. See REP-3: Target platforms.

The first ROS 1 release with official support for Python 3 will be ROS Noetic Ninjemys (ros-infrastructure/rep#202). See also wiki/UsingPython3 and wiki/noetic/Migration.

If you need Python 3 with Melodic, you'll have to build it from source. See #q237613 for a Q&A with some example workflows.

Note: building (base) ROS from source means you cannot use apt any more to install additional packages (as those will only work with Python 2).

edit flag offensive delete link more

Comments

@gvdhoorn Thanks for your explanation. It is clear now.

gustavo.velascoh gravatar image gustavo.velascoh  ( 2020-04-01 13:45:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-04-01 06:59:55 -0500

Seen: 196 times

Last updated: Apr 01