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.

pipenv install --deploy now fails after having worked for months

See original GitHub issue

Issue

pipenv install --deploy now fails in my docker build step due to out of date lockfile.

However whenever I run pipenv lock, it fails to update the hash and instead spits out the original hash that it already was.

Expected

I expect the dependencies to install, as they have been for almost 6 months with no issue.

Actual result

✔ Successfully created virtual environment! 
Virtualenv location: /root/.local/share/virtualenvs/-x-v5uFv0
Your Pipfile.lock (ab547e) is out of date. Expected: (9d352e).
Usage: pipenv install [OPTIONS] [PACKAGES]...

ERROR:: Aborting deploy

Steps to replicate

  • RUN pipenv install --deploy (in a Docker build step, having copied in the Pipfile and Pipfile.lock)

output.txt

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:22

github_iconTop GitHub Comments

4reactions
matteiuscommented, Oct 10, 2022

Sorry for those issues folks – pipenv==2022.10.10 has been released which includes the fix for the Pipfile hash changing, and also the fix for the metadata writing to the lock file at the end of the lock phase.

@Nick-Yazdani the hash generation changed back to how it was before – you may need to re-lock again to get back to that point.

2reactions
matteiuscommented, Oct 10, 2022

@Nick-Yazdani I opened a PR that I think addresses the issue – the fix is to always re-write the meta section of the generated lockfile dictionary, prior to writing it to the file. I am not sure how it ever worked in the prior implementation, but I don’t imagine this causing many other issues (though one test is failing with this change). Will run through test suite and think through it some more, if possible will cut a new release tomorrow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pipenv install -e . fails due to dependency resolution ... - GitHub
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again. Alternatively, you can use $ pipenv ......
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
The second most common reason locking fails is that we attempt to install a package that is a pre-release version. You can resolve...
Read more >
Pipenv throws and error when installing in docker
The bug has been fixed with today's release, so you can now go back to your original version. You may need to clear...
Read more >
Advanced Usage of Pipenv - Read the Docs
pipenv install --deploy. This will fail a build if the Pipfile.lock is out–of–date, instead of generating a new one. Or you can install...
Read more >
Pipenv install with all the flags, explained - Micah Smith
--deploy : According to the documentation, "This will fail a build if the Pipfile.lock is out–of–date, instead of generating a new one." The ......
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