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.

Add `--pipfile Pipfile.lock` as an alternative of `-r requirements.txt`

See original GitHub issue

What’s the problem this feature will solve?

I use container to deploy Python application to production. The container building script performs the following command lines:

python3 -m pip install pipenv
python3 -m pipenv sync  # Install modules from Pipenv.lock 
python3 -m pipenv run python3 -m pip freeze > requirements.txt
python3 -m pip install -r requirements.txt
python3 -m pip uninstall pipenv
rm requirements.txt

Describe the solution you’d like

Replace the above command lines by just one pretty pip option:

python3 -m pip install --pipfile Pipfile.lock

Additional context

The project https://github.com/pypa/pipfile/blob/master/README.rst states:

Pipfile and its sister Pipfile.lock are a replacement for the existing standard pip’s requirements.txt file.

Let’s start the movement by adding an experimental option in next pip release 😄

EDIT: My colleague has just pointed me that this has already been (eventually) planed. The same document, at chapter Pip Integration (eventual) says:

pip will grow a new command line option, -p / --pipfile to install the versions as specified in a Pipfile, similar to its existing -r / --requirement argument for installing requirements.txt files.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
pfmoorecommented, Aug 26, 2019

I’m not sure there’s consensus that pipenv.lock is a replacement for requirements.txt (regardless of what is stated in that project’s repository) and I’m cautious about adding an option to pip that is specific to another project (will we then get requests to add an option for Poetry’s lock file format?)

At a minimum, I’d like to see some discussion within the community that resulted in agreement that pipenv.lock was a standard format, before adding this (and in particular, I’d like the poetry devs to have bought into that agreement).

4reactions
pradyunsgcommented, Aug 27, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Usage of Pipenv - Read the Docs
You can convert a Pipfile and Pipfile.lock into a requirements.txt file very easily, and get all the benefits of extras and other goodies...
Read more >
Pipfile.lock → requirements.txt - Zebradil
This command (surprisingly) doesn't just install all packages with the versions from Pipfile. lock as we expected, but update dependencies with ...
Read more >
pipenv v/s requirements.txt. What is all about it?
pipenv lock is used to create a Pipfile.lock, which declares all dependencies (and sub-dependencies) of your project, their latest available ...
Read more >
Advantages of Pipfile.lock Over requirements.txt
Lock files allow us to create deterministic python builds. Similar to requirements.txt we can specify a version or version range for a given ......
Read more >
pipenv Documentation
Pipenv uses two files to do this: Pipfile and Pipfile.lock (which will look ... You can also specify $ pipenv install -r path/to/requirements.txt...
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