Running pip install --user while a virtual environment is active fails with Can not perform a '--user' install. User site-packages are not visible in this virtualenv. This is not a bug and no flag disables it.
Virtual environments are created with include-system-site-packages = false in pyvenv.cfg, and in that mode Python sets site.ENABLE_USER_SITE to False, so ~/.local/lib/python3.x/site-packages is not on sys.path. Installing there would put files somewhere the running interpreter can never import from, so pip refuses up front instead of appearing to succeed.
The usual cause is a Dockerfile or CI script that carries --user over from a system-Python era and then adds a venv. Drop the flag when a venv is active; pip install already targets the venv. Confirm which interpreter you are about to modify with python -m pip --version, which prints the pip path and the Python it manages, and prefer python -m pip over a bare pip so the two can never disagree.