2026-06-29
Why PIP_NO_USER=1 installs to global env
2026-06-29 ~ 2026-10-16

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 of envs/<env>/lib/.../site-packages.
  • Cause. The container image exports PIP_NO_USER=1 globally. Despite the
    name, this forces user-site installs — the NO_ is ignored. PIP_NO_USER
    behaves identically to PIP_USER.
  • Fix. Any one of:
    1
    2
    3
    
    unset 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:

2025-11-07
SSH自动登录与debug
2025-11-07 ~ 2025-11-07

The note is generated by “DeepSeek”.

一、基础设置步骤

1. 生成 SSH 密钥对(客户端)

1
2
ssh-keygen -t rsa -b 4096
# 默认保存位置:~/.ssh/id_rsa (私钥) 和 ~/.ssh/id_rsa.pub (公钥)

2. 复制公钥到服务器

方法一:使用 ssh-copy-id(推荐)