question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

THESE PACKAGES DO NOT MATCH THE HASHES FROM Pipfile.lock

See original GitHub issue

I Download an whl package, but when i install pycrypto-2.6.1-cp36-cp36m-win_amd64.whl, i got an error.“THESE PACKAGES DO NOT MATCH THE HASHES FROM Pipfile.lock”. How could i fix it?

Here is pipfile content: pycrypto = {path = "./tools/pycrypto-2.6.1-cp36-cp36m-win_amd64.whl"}

Here is pipfile.lock content:

        "pycrypto": {
            "hashes": [
                "sha256:f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c"
            ],
            "path": "./tools/pycrypto-2.6.1-cp36-cp36m-win_amd64.whl",
            "version": "==2.6.1"
        },

GLL-PC /E/PycharmProjects/FNTools/tools (master) penv install ile.lock (e7bca1) out of date, updating to (79451c)… ing [dev-packages] dependencies… ing [packages] dependencies… ted Pipfile.lock (79451c)! alling dependencies from Pipfile.lock (79451c)… rror occurred while installing ./tools/pycrypto-2.6.1-cp36-cp36m-win_amd64.whl! Will try again. ============================== 5/5 - 00:00:39 alling initially failed dependencies… essing e:\pycharmprojects\fntools\tools\pycrypto-2.6.1-cp36-cp36m-win_amd64.whl

E PACKAGES DO NOT MATCH THE HASHES FROM Pipfile.lock!. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; so e may have tampered with them. pycrypto==2.6.1 from file:///E:/PycharmProjects/FNTools/tools/pycrypto-2.6.1-cp36-cp36m-win_amd64.whl (from -r C:\Windows\TEMP\pipenv-gp99w756-requirements\pipenv-qyvtpjcs- irement.txt (line 1)): Expected sha256 f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c Got a41a5bd1189567879233e56057b637cb3b266b74fadf2300e29d437e2d55367b

================================ 0/1 - 00:00:00

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
techalchemycommented, Oct 12, 2018

Given that the wheel is from PyTorch it very well might be that they simply changed the wheel and now the hash is different. This is completely outside of our control and exactly what pipenv is designed to catch. If you don’t mind, just re-lock with pipenv lock.

1reaction
psarkacommented, Oct 12, 2018

I get the same when trying to install pytorch:

mkdir failing-install && cd failing-install
pipenv install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl

gives:

pipenv install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl
Creating a virtualenv for this project…
Pipfile: /home/besarkap/Documents/failing-torch/Pipfile
Using /usr/bin/python3 (3.6.6) to create virtualenv…
⠸Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/besarkap/.local/share/virtualenvs/failing-torch-dnIUgSxD/bin/python3
Also creating executable in /home/besarkap/.local/share/virtualenvs/failing-torch-dnIUgSxD/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /home/besarkap/.local/share/virtualenvs/failing-torch-dnIUgSxD
Creating a Pipfile for this project…
Installing http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl…
Collecting torch==0.4.1 from http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl#egg=torch
  Downloading http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl (91.1MB)
Installing collected packages: torch
Successfully installed torch-0.4.1

Adding torch to Pipfile's [packages]…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (8d9400)!
Installing dependencies from Pipfile.lock (8d9400)…
An error occurred while installing http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl#egg=torch --hash=sha256:108aef4c2744724d19d76c2344108db6abb60e86cfc9e06eb3d46386ea3b6097 --hash=sha256:2acd73723a0f0bd0b8114531e78b7ad3c753a2f2c0047623043cba4dae08ae90 --hash=sha256:400f50a9551c5ed2fbea9bd199e14e2ec79964dd792053802b51269eec96320b --hash=sha256:4bf7ffe72bf1af8305b6a3acbe246351f4e09a1c4d4de2364066064da56c869b --hash=sha256:725ae85be70a569583863c263e281938b21e5e92d9a8f480094555b59a82936d --hash=sha256:762eeb0ef4c6de1d9bf12616f362d979cabf1c2b988d5a90bb074adcdc30a079 --hash=sha256:7e3bac584473688720e26323bf209b97c015fc4e9a12a34962df3ff7ad0ce597 --hash=sha256:db668180b11144579d503041339025cc76a70bc0da877f2f91f386fe9229e292 --hash=sha256:e740fb4442ab0cf6a5e5c5279b6ad3cebdeb8f30ce1dabb293cf437178f12a78! Will try again.
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:11
Installing initially failed dependencies…
Collecting torch==0.4.1 from http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl#egg=torch 
  Downloading http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl (91.1MB)

THESE PACKAGES DO NOT MATCH THE HASHES FROM Pipfile.lock!. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    torch==0.4.1 from http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl#egg=torch (from -r /tmp/pipenv-hu8or6yw-requirements/pipenv-0dhgyp12-requirement.txt (line 1)):
        Expected sha256 108aef4c2744724d19d76c2344108db6abb60e86cfc9e06eb3d46386ea3b6097
        Expected     or 2acd73723a0f0bd0b8114531e78b7ad3c753a2f2c0047623043cba4dae08ae90
        Expected     or 400f50a9551c5ed2fbea9bd199e14e2ec79964dd792053802b51269eec96320b
        Expected     or 4bf7ffe72bf1af8305b6a3acbe246351f4e09a1c4d4de2364066064da56c869b
        Expected     or 725ae85be70a569583863c263e281938b21e5e92d9a8f480094555b59a82936d
        Expected     or 762eeb0ef4c6de1d9bf12616f362d979cabf1c2b988d5a90bb074adcdc30a079
        Expected     or 7e3bac584473688720e26323bf209b97c015fc4e9a12a34962df3ff7ad0ce597
        Expected     or db668180b11144579d503041339025cc76a70bc0da877f2f91f386fe9229e292
        Expected     or e740fb4442ab0cf6a5e5c5279b6ad3cebdeb8f30ce1dabb293cf437178f12a78
             Got        60bbd3198dacfc8812f3e447ae4f30bb23bb0390bbf7af922c165a8731942055


  ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/1 — 00:00:11
Read more comments on GitHub >

github_iconTop Results From Across the Web

python - pipenv: packages do not match the hashes from the ...
Pipfile. lock has expected old version and it's a sha256 hash. Any help to resolve this would be highly appreciated.
Read more >
Error: these packages do not match the hashes from the ...
ERROR : THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the...
Read more >
Basic Usage of Pipenv - Python Packaging Authority
$ pipenv lock is used to create a Pipfile.lock , which declares all dependencies (and sub-dependencies) of your project, their latest available versions,...
Read more >
pipenv Documentation - Read the Docs
Generates and checks file hashes for locked dependencies when installing from Pipfile.lock. • Automatically install required Python version when pyenv is ...
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
Locking Issue: Pipfile Contains a Reference to an Inexistent Package ... Pipfile won't lock when it tries to install packages that don't exist,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found