diff --git a/Makefile b/Makefile index 035699bbf68064..fbf22dbcc4c3a0 100644 --- a/Makefile +++ b/Makefile @@ -1493,7 +1493,8 @@ cpplint: lint-cpp # Try with '--system' if it fails without; the system may have set '--user' lint-py-build: $(info Pip installing ruff linter on $(shell $(PYTHON) --version)...) - $(PYTHON) -m pip install --upgrade --user ruff + $(PYTHON) -m pip install --upgrade --target tools/pip/site-packages ruff || \ + $(PYTHON) -m pip install --upgrade --system -target tools/pip/site-packages ruff .PHONY: lint-py # Lints the Python code with ruff.