Skip to main content

Pip cache errors

Issue

  • The installer is failing at the pip stage with such kind of error message:
    Collecting pycparser
    Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
    ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
     ansible-core==2.13.5 from https://files.pythonhosted.org/packages/ee/84/5d22ae84e2a2644f631be42c9be81f5704a556ac2b705b14e83f343d37a6/ansible_core-2.13.5-py3-none-any.whl#sha256=3d2503ede324e0e73051b14e77f732a3cb0aed2437f94608af53929d2d1d54c8 (from -r requirements.txt (line 3)):
         Expected sha256 3d2503ede324e0e73051b14e77f732a3cb0aed2437f94608af53929d2d1d54c8
              Got        d9cb3de3cb5383a6effdab05486a3ffc34a813b4647e53634bb4505517e1abfa
    

Environment

  • Ubuntu 20.04
  • Standalone installer 2022-10.02 updating to 2022-11.01-pre1

Resolution

  • You need to clear the pip cache dir to force pip to re-download the collection.
cd ~/.cache/pip
rm -rf http

Root cause

  • Undetermined at this time, probable cause is a storage issue.