From 8ae487d48e6bb7e66a81c816a4bd0786ef07b968 Mon Sep 17 00:00:00 2001 From: Marek Fiala Date: Wed, 2 Jul 2025 12:36:59 +0200 Subject: [PATCH] feat(tools): Enforce pip 'user' option to no, when installing python env Closes https://github.com/espressif/esp-idf/issues/16189 --- tools/idf_tools.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/idf_tools.py b/tools/idf_tools.py index c408dfc501..e5c9c37c3c 100755 --- a/tools/idf_tools.py +++ b/tools/idf_tools.py @@ -2886,12 +2886,8 @@ def action_install_python_env(args): # type: ignore install_legacy_python_virtualenv(idf_python_env_path) env_copy = os.environ.copy() - if env_copy.get('PIP_USER') == 'yes': - warn( - 'Found PIP_USER="yes" in the environment. ' - 'Disabling PIP_USER in this shell to install packages into a virtual environment.' - ) - env_copy['PIP_USER'] = 'no' + # Enforce disabling possible pip 'user' option to prevent installation error with virtual environment + env_copy['PIP_USER'] = 'no' constraint_file = get_constraints(idf_version) if use_constraints else None