ros-infrastructure / rosdep

rosdep multi-package manager system dependency tool
http://ros.org/wiki/rosdep
BSD 3-Clause "New" or "Revised" License
75 stars 170 forks source link

rosdep unable to determine installation of pip packages with extras or versions #900

Open JWhitleyWork opened 1 year ago

JWhitleyWork commented 1 year ago

I don't yet have a fix for this but just wanted to document the findings. When specifying Python packages to be installed by pip that include either a specific version (e.g. package==1.0.0) or with extras (e.g. package[extra]), pip is able to install the packages correctly but rosdep is unable to confirm installation of the packages. More complete example:

Snippet of custom YAML file:

python3-mycroft-plugin-tts-mimic3-pip:
  debian:
    pip:
      packages: ["mycroft-plugin-tts-mimic3[all]"]
  ubuntu:
    pip:
      packages: ["mycroft-plugin-tts-mimic3[all]"]
...
python3-pyee8-pip:
  debian:
    pip:
      packages: ["pyee==8.1.0"]
  ubuntu:
    pip:
      packages: ["pyee==8.1.0"]

Output of rosdep when installing these dependencies:

Installing collected packages: mycroft-plugin-tts-mimic3
Successfully installed mycroft-plugin-tts-mimic3-0.1.5
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
executing command [sudo -H pip3 install -U pyee==8.1.0]
Collecting pyee==8.1.0
  Using cached pyee-8.1.0-py2.py3-none-any.whl (12 kB)
Installing collected packages: pyee
Successfully installed pyee-8.1.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
ERROR: the following rosdeps failed to install
  pip: Failed to detect successful installation of [mycroft-plugin-tts-mimic3[all]]
  pip: Failed to detect successful installation of [pyee==8.1.0]
vonZeppelin commented 1 year ago

Bumped into this too. I think there is yet another issue that can be tracked under this ticket: rosdep fails to detect successful installation of pip packages specified as VCS links, at least the error message at the end of installation is the same.

Current workaround is to install Python dependencies with the source rosdep package manager, i.e., using shell / Python scripts.