# Revision history [back]

I don't know why this is the case, but I can explain how rosdep decides to use apt on Bionic while it uses pip on Xenial.

If we look at ros/rosdistro/rosdep/python.yaml, which is where rosdep gets its information about how to map keys to actual packages, we see this for the python-gpiozero key (from here):

python-gpiozero:
...
ubuntu:
...
bionic: [python-gpiozero]
...
xenial:
pip:
packages: [gpiozero]
...


we can clearly see that for xenial, the pip installer is requested, while for bionic, only the package name is listed, which will make rosdep use the default installer for that OS, which would be apt.

I don't know why this is the case, but I can explain how rosdep decides to use apt on Bionic while it uses pip on Xenial.

If we look at ros/rosdistro/rosdep/python.yaml, which is where rosdep gets its information about how to map keys to actual packages, we see this for the python-gpiozero key (from here):

python-gpiozero:
...
ubuntu:
...
bionic: [python-gpiozero]
...
xenial:
pip:
packages: [gpiozero]
...


we can clearly see that for xenial, the pip installer is requested, while for bionic, only the package name is listed, which will make rosdep use the default installer for that OS, which would be apt.

It looks like these keys were added in ros/rosdistro#16544,which initially used pip for everything, but based on a comment by @tfoote changed to apt for some OS.

The package does exist according to packages.ubuntu.com (here), but I also get Unable to locate package python-gpiozero trying to install it using apt.

I would suggest to figure out why that is the case, instead of trying to force the use of pip (which would be impossible, short of changing the key for python-gpiozero).

I don't know why this is the case, but I can explain how rosdep decides to use apt on Bionic while it uses pip on Xenial.

If we look at ros/rosdistro/rosdep/python.yaml, which is where rosdep gets its information about how to map keys to actual packages, we see this for the python-gpiozero key (from here):

python-gpiozero:
...
ubuntu:
...
bionic: [python-gpiozero]
...
xenial:
pip:
packages: [gpiozero]
...


we can clearly see that for xenial, the pip installer is requested, while for bionic, only the package name is listed, which will make rosdep use the default installer for that OS, which would be apt.

It looks like these keys were added in ros/rosdistro#16544,which initially used pip for everything, but based on a comment by @tfoote changed to apt for some OS.

The package does exist according to packages.ubuntu.com (here), but I also get Unable to locate package python-gpiozero trying to install it using apt.

I would suggest to figure out why that is the case, instead of trying to force the use of pip (which would be impossible, short of changing the key for python-gpiozero).

Edit: ah, I overlooked the available architectures listed on packages.ubuntu.com/bionic/python-gpiozero. It looks like that package is only available for arm64 and armhf. I'm trying this on amd64, so it would make sense for apt not being able to find it. pip does not check these sort of things, so it will happily install anything, anywhere (which may then still fail).

Are you running rosdep on arm64 or armhf?