Getting SHA verify error upgrading to bookworm on python3 install

Details:

  • Date | Fri Jul 28 14:20:28 EDT 2023
  • Bug report | c57ae1b3-4ea0-4cb6-98be-cae15a392ca8
  • DietPi version | v8.19.1 (MichaIng/master)
  • Image creator | DietPi Core Team
  • Pre-image | Armbian
  • Hardware | NanoPi NEO (armv7l) (ID=60)
  • Kernel version | Linux MagicCube 5.15.93-sunxi #23.02.2 SMP Fri Feb 17 23:49:46 UTC 2023 armv7l GNU/Linux
  • Distro | bookworm (ID=7)
  • Command | python3 get-pip.py
  • Exit code | 1
  • Software title | DietPi-Software

Steps to reproduce

While upgrading to bookworm, on Python3 install before Re-installing Home Assistant
2. …

Expected behaviour

correct checksum

Actual behaviour

wrong checksum. installation errors out- …

Extra details

> [  OK  ] DietPi-Software | APT install python3-dev
> [  OK  ] DietPi-Software | G_THREAD: All threads finished
> [ INFO ] DietPi-Software | python3 get-pip.py, please wait...
> Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/
> Collecting pip
>   Downloading https://www.piwheels.org/simple/pip/pip-23.2.1-py3-none-any.whl (2.1 MB)
>      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━        1.7/2.1 MB 16.5 kB/s eta 0:00:22
> 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.
>     pip from https://www.piwheels.org/simple/pip/pip-23.2.1-py3-none-any.whl#sha256=62975f3209e9594e789483455e7203289e496fb98bf9860c80f250931d757f31:
>         Expected sha256 62975f3209e9594e789483455e7203289e496fb98bf9860c80f250931d757f31
>              Got        d7227d73071097597f1e33a6e4bc52113c2aff4fe0b3a28b19419d82fda5960a
> 
> [FAILED] DietPi-Software | python3 get-pip.py
> [ INFO ] DietPi-Software | python3 get-pip.py, please wait...
> Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/
> Collecting pip
>   Downloading https://www.piwheels.org/simple/pip/pip-23.2.1-py3-none-any.whl (2.1 MB)
>      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━     1.9/2.1 MB 17.1 kB/s eta 0:00:11
> 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.
>     pip from https://www.piwheels.org/simple/pip/pip-23.2.1-py3-none-any.whl#sha256=62975f3209e9594e789483455e7203289e496fb98bf9860c80f250931d757f31:
>         Expected sha256 62975f3209e9594e789483455e7203289e496fb98bf9860c80f250931d757f31
>              Got        ee6615dd2a91cc76be1f49848085a97c5b9dd0ffd0787d4da50345756cd9e62e
> 
> [FAILED] DietPi-Software | python3 get-pip.py
> - ...

Looks like file download from http://www.piwheels.org is corrupted. :thinking:

But for me, this is working fine. Just tested on a RPi3B+ 32bit without issues

[  OK  ] DietPi-Software | APT install python3-dev
[  OK  ] DietPi-Software | G_THREAD: All threads finished
[ INFO ] DietPi-Software | python3 get-pip.py, please wait...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/
Collecting pip
  Downloading https://www.piwheels.org/simple/pip/pip-23.2.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 1.7 MB/s eta 0:00:00
Collecting setuptools
  Downloading https://www.piwheels.org/simple/setuptools/setuptools-68.0.0-py3-none-any.whl (804 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 804.0/804.0 kB 1.8 MB/s eta 0:00:00
Collecting wheel
  Downloading https://www.piwheels.org/simple/wheel/wheel-0.41.0-py3-none-any.whl (64 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.7/64.7 kB 4.2 MB/s eta 0:00:00
Installing collected packages: wheel, setuptools, pip
Successfully installed pip-23.2.1 setuptools-68.0.0 wheel-0.41.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[  OK  ] DietPi-Software | python3 get-pip.py
[  OK  ] DietPi-Software | rm get-pip.py

Can you try again to reinstall Python?

dietpi-software reinstall 130

yah that installed no issues. strange… but at least it’s working.

And HA reinstall finished as well?

Yup, that installed just fine after that.

It is rare, but it is possible that a correct files gets corrupted during download/transfer due to random errors, or while writing it to disk.