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 lock --requirements --no-hashes outputs hashes

See original GitHub issue

I was trying to run pipenv in a Dockerfile and in order to install the deps globally I use this code:

ADD Pipfile /src/Pipfile
ADD Pipfile.lock /src/Pipfile.lock
RUN pipenv lock --requirements --no-hashes > /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt

since I’m developing on a mac the hashes will be different, so I’m using the --no-hashes option. Unfortunately this still outputs the hashes when using --requirements.

Is this the intended behaviour? If so how I can properly use pipenv in a Dockerfile? I don’t really need a virtualenv in this case

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nateprewittcommented, Mar 16, 2017

Alright, we’re all tidied up with 86ef9b8. I’m going to wait a few days to cut the hotfix since this isn’t in the critical path. That will give some time for any other bugs in 3.5.4 to float in and hopefully get wrapped up.

Thanks again @patrick91! Glad you’ve got things working now.

1reaction
nateprewittcommented, Mar 16, 2017

Hey @patrick91, thanks for spotting this! It looks like --no-hashes works as expected with pipenv lock --requirements --no-hashes when the Pipfile.lock doesn’t exist but not when it does. I’ll try to get this patched this morning.

For the time being, I would suggest removing the ADD Pipfile.lock /src/Pipfile.lock requirement from your Dockerfile for now and things should work as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - pipenv: packages do not match the hashes from the ...
I recently installed O365 and shortuuid packages using following command, which got executed with no problems on Mac M1. pipenv install --keep- ...
Read more >
Pipenv: promises a lot, delivers very little | Chris Warrick
It locks dependencies in requirements.txt files, and that's all it does. It allows updating dependencies in the file based on what's on PyPI....
Read more >
Basic Usage of Pipenv - Read the Docs
txt output of the lockfile, run $ pipenv lock -r . This will include all hashes, however (which is great!). To get a...
Read more >
History | Poetry - Python dependency management and ...
Fix an issue where poetry lock --no-update added duplicate hashes to the lock file (#6389). Fix an issue where poetry install fails because...
Read more >
pipenv Changelog - PyUp.io
and also fix regression where lock phase did not update the hash value. ... command which generates a requirements.txt compatible output without locking....
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