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.

[Cli Docs?] Conflicting Info in regards to `pipenv lock --dev --requirements`

See original GitHub issue


Docs, Actual Results, and CLI Help are in conflict: Should --dev include only dev dependencies? Or both dev + default dependencies?

Actual Results

pipenv lock --dev --requiremnts

Outputs only dev dependencies


States that --dev should output only dev dependencies

If you wish to generate a requirements.txt with only the development requirements you can do that too! … pipenv lock -r --dev

CLI usage

States --dev should includes both dev + default dependencies:

  -d, --dev           Install *both* develop and default packages.  [env var: PIPENV_DEV]

pipenv, version 2018.11.26

Issue Analytics

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

github_iconTop GitHub Comments

gtalaricocommented, Dec 10, 2018

I understand the logic, but using the same exact --dev flag for opposite behaviors smells funny to me 🙊


Did i get this right?

Command Flags Default Deps Dev Deps
pipenv install none
pipenv install --dev
pipenv lock none
pipenv lock --requirements
pipenv lock --requirements --dev
  • installing only dev dependencies is possible using (ok, edge case use)

pipenv lock -r -d > requirements-dev.txt && pip install requirements-dev.txt

nickwilliams-eventbritecommented, Aug 1, 2019

Yet another very frustrating roadblock for us. We’re trying to work around #1356 and #3586, which are basically killing us. We decided to just convert the Pipfile.lock to a requirements.txt because we know we can rely on pip install to actually fail when it fails. But pipenv lock -r --dev was not working as expected/documented. So then I came across this issue.

We completely disagree with the assertion that the documentation is wrong. It makes no sense for --dev to work differently here than it does in install, et. al. If you see a use case for dev-only requirements files, then add --dev-only, or, at the very least, PLEASE give us a --default-and-dev option so we can generate one file with everything. What should be a simple pipenv install --dev --deploy for us has now become the following, and it’s horribly frustrating:

    pipenv lock --requirements > .tmp_requirements.txt
    pipenv lock --requirements --dev > .tmp_requirements_dev.txt
    pip install -r .tmp_requirements.txt
    pip install -r .tmp_requirements_dev.txt
    rm .tmp_requirements*.txt
Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Encountered Pipenv Problems - Read the Docs
Run pipenv lock --clear and try again. The lock sequence caches results to speed up subsequent runs.
Read more >
Pipenv: A Guide to the New Python Packaging Tool
Pipenv is a packaging tool for Python that solves some common problems associated with the typical workflow using pip, virtualenv, and the good...
Read more >
InvenioRDM Alpha 1 (October release) - Invenio RDM
First try clearing your dependency cache with pipenv lock --clear, then try the original command again. Alternatively, you can use pipenv install --skip-lock...
Read more >
Dependency Scanning - GitLab Docs
txt , requirements.pip , or requires.txt for projects using Pip. Pipfile or Pipfile.lock for projects using Pipenv.
Read more >
pipenv v/s requirements.txt. What is all about it? - LinkedIn
pipenv lock is used to create a Pipfile.lock, which declares all dependencies (and sub-dependencies) of your project, their latest available ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found