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 clean [perhaps] should not update Pipfile.lock

See original GitHub issue

On one hand, help for clean command suggests that the lock file will only be read:

> pipenv clean --help
Usage: pipenv clean [OPTIONS]

  Uninstalls all packages not specified in Pipfile.lock.

...

On the other, in my case, the log suggests that the lock file got updated:

> pipenv clean -v
Pipfile.lock (e3d06d) out of date, updating to (327524)…
Locking [dev-packages] dependencies…
✔ Success!
Using pip: -i https://pypi.org/simple --extra-index-url https://[private]/pypi/
Using pip: -i https://pypi.org/simple --extra-index-url https://[private]/pypi/
Using pip: -i https://pypi.org/simple --extra-index-url https://[private]/pypi/

                          ROUND 1
Current constraints:
...

Clearly I don’t quite understand the internal mechanics of pipenv. Overall this seems inconsistent.

TBH, it is quite possible that my lock file did not match the pip file, as I was messing out with some dependencies and could have forgotten to lock dep list. I’m not quite sure what would be the right thing for the command to do in this case.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
techalchemycommented, Jan 19, 2019

There is an API discussion to have here but mostly locking happened because your Pipfile was out of sync with your lockfile. This is a side effect of some other parts of the code, honestly, and if you haven’t locked yet then the new packages obviously haven’t been installed. Clean probably shouldn’t require this— it should just use the current lockfile

0reactions
satshabad-crcommented, Apr 24, 2019

I encountered this as well, and it’s non-intuitive

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle `pip install` inside a pipenv environment (not ...
First, let's clarify that the pipenv install command is just a wrapper for pip . If you install with --verbose , you'll see...
Read more >
Pipenv & Virtual Environments - Python Packaging Authority
This tutorial walks you through installing and using Python packages. It will show you how to install and use the necessary tools and...
Read more >
Pipenv — Dan's Cheat Sheets 1 documentation
Just run “pipenv install [-r requirementsfile]” and it'll see that there's no Pipfile but a requirements file, and will generate a new Pipfile...
Read more >
Simplify Your Python Developer Environment | by Mason Egger
The Pipfile.lock is referenced whenever you attempt to do a pipenv install with a specified Pipfile. If the hashes in the lock file...
Read more >
pipenv Documentation - Read the Docs
Pipenv uses two files to do this: Pipfile and Pipfile.lock (which will look familiar ... Pipenv will install version 1.2 and any minor...
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