miketeo / pysmb

pysmb is an experimental SMB/CIFS library written in Python. It implements the client-side SMB/CIFS protocol (SMB1 and SMB2) which allows your Python application to access and transfer files to/from SMB/CIFS shared folders like your Windows file sharing and Samba folders.
Other
341 stars 94 forks source link

Hash mis-match when installing pysmb #221

Closed musha34 closed 4 months ago

musha34 commented 4 months ago

Installing pysmb via below cmd: pip3 install pysmb --trusted-host pypi.org --trusted-host files.pythonhosted.org

Got below error:

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. pysmb from https://files.pythonhosted.org/packages/93/67/75acf7972a8056cfb216f389d0fbda62f6d691fab4ca1a26c1a0d6ecd9e7/pysmb-1.2.9.1.zip: Expected sha256 ad613988d54b1317ca0466dc3546f47b2dddea16e645d755d29fb75a86903326 Got 32efdb9c14ebf7bc81274e3e77475d21a410a0ccc45d570bb80344a384615a31

Tried removal of site-packages/pycache. Does not help.

musha34 commented 4 months ago

python3.9.19 on MPB M3 chip.

miketeo commented 4 months ago

@musha34 I have tried using your command to install pysmb, and the command completed successfully without any hash errors.

I have also downloaded the file using your provided URL, and have verified the checksum to be correct. image

I'm not sure what's causing the checksum issue. A workaround is to download the zip file, verify the checksum, and then run pip3 install [path to zip file] to install the package.

musha34 commented 4 months ago

@miketeo Thanks. The issue resolved. The root cause is the HASH code differs when wget with or without vpn. It turns out that I need to wget the zip via VPN so as to obtain the zip with expected hash. Then pip install does the job.

Mu

musha34 commented 4 months ago

Not an issue. closed.