文章列表: 1 篇
2026-06-29
2026-06-29 ~ 2026-06-29
The note is generated by GLM5.2.
A pip install run inside an activated conda env kept landing in ~/.local
instead of the env’s site-packages. This is what was going on.
TL;DR — everything you need is here
- Symptom. Inside an activated conda env,
pip install <pkg>installs to~/.local/lib/python3.10/site-packages(shared across every py3.10 env)
instead ofenvs/<env>/lib/.../site-packages. - Cause. The container image exports
PIP_NO_USER=1globally. Despite the
name, this forces user-site installs — theNO_is ignored.PIP_NO_USER
behaves identically toPIP_USER. - Fix. Any one of:
1 2 3unset PIP_NO_USER # in ~/.bashrc (permanent, interactive shells) PIP_NO_USER=0 pip install … # per-command pip install --no-user … # per-command (CLI flag inverts correctly)
Quick reference: