ANTsX / ANTsPy

A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
https://antspyx.readthedocs.io
Apache License 2.0
586 stars 161 forks source link

Ubuntu Python 3.9 installation error (sha256 mismatch) #664

Closed dipterix closed 1 month ago

dipterix commented 1 month ago

Using pip install failed with errors (SHA256 mismatch)

Downloading antspyx-0.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (345.9 MB)
...
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.
    unknown package:
        Expected sha256 663ade1c6a30c2c2176e3b1a3a109959f0aecd219cb91afe310a812ae5ce93e5
             Got        7d8ca88192cc50dbafa510952b55ae294a77267706230b3c5a6741e0dd3e2254

An error is detected.

It was fine days ago... I wonder if it's possible that you might have uploaded to pip with a new version but forgot to change the version?

$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
cookpa commented 1 month ago

This is so weird, if I download the file, it looks correct

https://files.pythonhosted.org/packages/6b/b3/c5516b1c127b58317eb49cf179709ab033b293ab2b4d58f6204b28b17c29/antspyx-0.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

% sha256sum /Users/pcook/Downloads/antspyx-0.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl  
663ade1c6a30c2c2176e3b1a3a109959f0aecd219cb91afe310a812ae5ce93e5  /Users/pcook/Downloads/antspyx-0.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Perhaps it is being corrupted on download? Are you behind an institutional firewall?

dipterix commented 1 month ago

I think that could be the case. Thanks for reminding me that possibility. Will try again tonight

dipterix commented 1 month ago

You are right. I was able to install it correctly, after running pip cache purge. The cached version of package is in correct. Thanks for helping me : )