diff --git a/src/rosdep2/platforms/pip.py b/src/rosdep2/platforms/pip.py index 5c2db4152..c873d4003 100644 --- a/src/rosdep2/platforms/pip.py +++ b/src/rosdep2/platforms/pip.py @@ -148,7 +148,10 @@ def get_install_command(self, resolved, interactive=True, reinstall=False, quiet packages = self.get_packages_to_install(resolved, reinstall=reinstall) if not packages: return [] - cmd = pip_cmd + ['install', '-U'] + if sys.version_info() >= (3, 11): + cmd = pip_cmd + ['install', '-U', '--break-system-packages'] + else: + cmd = pip_cmd + ['install', '-U'] if quiet: cmd.append('-q') if reinstall: