python install_error ai_generated true

ERROR: unknown option --no-cache-dir

ID: python/pip-no-cache-dir-option

Also available as: JSON · Markdown · 中文
80%Fix Rate
85%Confidence
0Evidence
2025-04-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.6 active
3.7 active

Root Cause

The pip version is too old to support the --no-cache-dir option.

generic

中文

pip 版本过旧,不支持 --no-cache-dir 选项。

Workarounds

  1. 95% success Upgrade pip
    python -m pip install --upgrade pip
  2. 90% success Use pip install --no-cache-dir with newer pip
    After upgrade, use the option

Dead Ends

Common approaches that don't work:

  1. Using --no-cache instead 50% fail

    May not be recognized either.

  2. Setting environment variable PIP_NO_CACHE_DIR 40% fail

    May not be read by old pip.