piwheels / packages

Issue tracker for piwheels package issues
https://github.com/piwheels/packages/issues
20 stars 5 forks source link

Package issue: Hash sum mismatch on Botocore #438

Closed pettyalex closed 8 months ago

pettyalex commented 8 months ago

Package name

botocore

Package version

1.34.73-py3-none-any

PyPI URL

https://pypi.org/project/botocore/

piwheels URL

https://www.piwheels.org/project/botocore/

Python version

I am aware this is the issue tracker for a Python package index specifically for Raspberry Pi

I have checked for duplicate issues

I am the maintainer

More information

This looks extremely similar to https://github.com/piwheels/packages/issues/32, but I'm running a quite new pip (24.0). Is this happening because of transient network failures? I see very slow download speeds before these failures. I'm only opening this issue because it happens repeatably for me, and others: https://github.com/pypa/pip/issues/12424

I'm installing into python 3.12, but given that this is a pure python wheel that shouldn't matter.

I ran pip install botocore -vvv to get some more info, here's the bit where it failed:

Given no hashes to check 5616 links for project 'botocore': discarding no candidates
Collecting botocore
  Created temporary directory: /tmp/pip-unpack-p2gfn88p
  Found index url https://www.piwheels.org/simple/
  Resetting dropped connection: www.piwheels.org
  https://www.piwheels.org:443 "GET /simple/botocore/botocore-1.34.73-py3-none-any.whl HTTP/1.1" 200 12007391
  Downloading https://www.piwheels.org/simple/botocore/botocore-1.34.73-py3-none-any.whl (12.0 MB)
     ━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/12.0 MB 76.3 kB/s eta 0:02:09
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.
    botocore from https://www.piwheels.org/simple/botocore/botocore-1.34.73-py3-none-any.whl#sha256=7b560473efb5030aa0ec7655d296508511e25b59518878b50f05becd8d6fb5d5:
        Expected sha256 7b560473efb5030aa0ec7655d296508511e25b59518878b50f05becd8d6fb5d5
             Got        c0329dca4327347f05f18feaf4a18df411ad3c69c7fd9d69f0f0bcb3420ac349
pettyalex commented 8 months ago

Ah. This is just a manifestation of https://github.com/pypa/pip/issues/11153 , I believe. I'm on gigabit fiber and don't have packet loss problems often, and the Pi 400 is on a wired ethernet connection, so it seems like either piwheels.org or the systems in between us may be the source of network troubles.

Either way, pip giving up after intermittent reset connections is not your problem to solve, so I'm closing this issue. Thanks for your work on piwheels!

pettyalex commented 8 months ago

I had one last thought this morning: It looks like all of your traffic is served from the UK? That's going to be a subpar experience for US users, have you thought about standing up mirrors in the USA? I know that you could easily find dozens of groups offering to do it for free if you wanted: https://blog.thelifeofkenneth.com/2023/05/building-micro-mirror-free-software-cdn.html