From 2473b666137dd36321b017086084ae316d78dd2a Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Wed, 8 Apr 2026 16:22:10 +0200 Subject: [PATCH 1/2] Append always install to pip extra args --- pipenv/routines/install.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pipenv/routines/install.py b/pipenv/routines/install.py index 6d590346..301755fd 100644 --- a/pipenv/routines/install.py +++ b/pipenv/routines/install.py @@ -699,6 +699,18 @@ def batch_install_iteration( allow_global=False, extra_pip_args=None, ): + + # Gentoo patch: + # Install dependencies into the venv even if they exist + # in the system. + # This is needed because pipenv imports the system packages to run. + # It does not change your system's packages. + + if (extra_pip_args is not None) and ("-I" not in extra_pip_args): + extra_pip_args.append("-I") + + # End of Gentoo patch + with temp_environ(): if not allow_global: os.environ["PIP_USER"] = "0" -- 2.52.0