# Rosdep for pip is broken on Jazzy !wrapped_giftROS !wrapped_giftPackaging and Release Management jazzy, rosdep You have selected **0** posts. select all cancel selecting 1.1k views 11 likes 7 links 11 users 5 2 2 [](https://discourse.openrobotics.org/u/tnajjar "tnajjar") [](https://discourse.openrobotics.org/u/galou "galou") Aug 2024 2 / 17 Aug 2024 Jul 8 [](https://discourse.openrobotics.org/u/aposhian) aposhian 1 Aug 2024 rosdep for pip is completely broken on Ubuntu 24.04 (i.e. Jazzy): Rosdep fails to install pip packages on Python3.11+ · Issue #978 · ros-infrastructure/rosdep · GitHub. This issue (and a corresponding PR to fix) has been open for 3 weeks with no activity from maintainers. This seems like an important issue, since rosdep is the tool that can parse dependencies in package.xml in source builds. 1.1k views 11 likes 7 links 11 users 5 2 2 [](https://discourse.openrobotics.org/u/tnajjar "tnajjar") [](https://discourse.openrobotics.org/u/galou "galou") [](https://discourse.openrobotics.org/u/tnajjar) tnajjar Aug 2024 Definitely needs to be fixed soon but as a workaround you can turn on the “break-system-packages” option in the global pip config. Configuration - pip documentation v25.1.1 [](https://discourse.openrobotics.org/u/aposhian) aposhian Aug 2024 Thanks, that’s a helpful workaround [](https://discourse.openrobotics.org/u/rishikesavan) Rishikesavan Aug 2024 One way to solve this, without allowing “break-system-packages” is to use a virtual environment for python and activating it before running rosdep. I would normally run, sudo apt install python3-venv python3 -m venv /opt/myvenv source /opt/myenv/bin/activate rosdep install --from-path src -y Hope, it helps. [](https://discourse.openrobotics.org/u/nuclearsandwich) nuclearsandwich OSRA TGC Member Aug 2024 rosdep is designed to treat pip like an alternative system-level package manager. Deviating from this approach is not easily achievable without a significant rethinking of how pip packages are managed. In the meantime rosdep can provide an explicit check and recommended remediation. I’ve drafted ros-infrastructure/rosdep#979 to have rosdep check for the necessary configuration and instruct the user to apply it. [](https://discourse.openrobotics.org/u/danthony) danthony Aug 2024 @nuclearsandwich do you have a recommendation on how to integrate this change with a CI system? [](https://discourse.openrobotics.org/u/nuclearsandwich) nuclearsandwich OSRA TGC Member 1 Aug 2024 My first thought was that setting `PIP_BREAK_SYSTEM_PACKAGES=1` in the environment should just do it, but because rosdep wraps installations in sudo internally the user’s environment variables aren’t passed through. In my linked PR I’m considering passing that environment variable through from the user environment to the sudo environment when present. Setting the following in `/etc/pip.conf` is probably the most guaranteed CI solution at present: ```lang-ini hljs ini # Allow rosdep to install system-wide pip packages [install] break-system-packages = true ``` [](https://discourse.openrobotics.org/u/danthony) danthony Aug 2024 Thanks. I think setting that environment variable is working with ROS-I’s CI actions on Github. If it’s not working like I think it is I’ll start modifying `/etc/pip.conf` instead. [](https://discourse.openrobotics.org/u/nuclearsandwich) nuclearsandwich OSRA TGC Member Aug 2024 I am adding a dedicated article to rosdep’s documentation: I tried to include some CI recipes in it. Let me know which, if any work for you. 12 days later [](https://discourse.openrobotics.org/u/nuclearsandwich) nuclearsandwich OSRA TGC Member Aug 2024 On Friday last week I released rosdep 0.25.0 which includes a pip configuration check when Python >=3.11 is detected and provides instructions for configuring pip to allow rosdep installation. [](https://discourse.openrobotics.org/u/jeremie) Jeremie Aug 2024 Hi @nuclearsandwich, sorry for the ping but it seems that 0.25.0 also brought back the `pkg_ressources` deprecation warning when installed from apt (the pip package doesn’t seem affected). See the related issue. Not sure why that is but I’d be interested to know !:+1: [](https://discourse.openrobotics.org/u/nuclearsandwich) nuclearsandwich OSRA TGC Member Aug 2024 Thanks for filing the issue. My guess is that it has to do with the environment I created the debs in. I’ll take a look and see if I can resolve it in a 0.25.1. [](https://discourse.openrobotics.org/u/damulaval) damulaval Aug 2024 On a side note, if pip doesn’t work with `PIP_BREAK_SYSTEM_PACKAGES=1`, pyenv may be an alternative way to install system-wide packages with access to system site-packages without using virtual environments and without breaking system packages: ```lang-sh hljs bash pyenv virtualenv system --system-site-packages ros pyenv global ros rosdep install --from-path src -y ``` 18 days later [](https://discourse.openrobotics.org/u/schwimo) Schwimo Sep 2024 For me it worked when I created the pip.conf file under /etc/pip.conf with ```hljs ini [install] break-system-packages = true ``` And then I had to upgrade setuptools also with ```hljs css python3 -m pip install --upgrade setuptools ``` 21 days later [](https://discourse.openrobotics.org/u/galou) galou Oct 2024 Wouldn’t it be possible to use `pip install --prefix=<path-to-install-directory-in-ros-workspace>` to install packages only in the current workspace? [](https://discourse.openrobotics.org/u/peci1) peci1 Great contributor Oct 2024 This sounds like a great option. But what if there isn’t any active workspace? (You can call rosdep without having any workspace sourced) 9 months later [](https://discourse.openrobotics.org/u/rafal_gorecki) Rafal\_Gorecki Jul 8 Hi, it seems that the problem has returned recently. I don’t quite understand why there was peace for a long time and why the problem has returned. It seems that the error appeared during the last sync jazzy. pkg\_resources deprecation warning · Issue #1011 · ros-infrastructure/rosdep · GitHub Reply