Default `pip install` behavior?
Closed this issue · 4 comments
Currently, pip install
outputs You must give at least one requirement to install (see "pip help install")
. It would be nice to be able to do just pip install
in a directory with a Pipfile.lock
and have it recognize and run the installation automatically based on that file. This behavior is identical to pip install -p
("when -p
is bare") as described in the README
but provides a default for pip install
without needing the -p
flag, like npm install
. If no Pipfile.lock
file is found, pip install
can output its current error message.
Additionally, perhaps pip install
can recognize a Pipfile
if there is no Pipfile.lock
file, run the install, and generate a corresponding Pipfile.lock
file.
Thoughts?
Additionally, perhaps pip install can recognize a Pipfile if there is no Pipfile.lock file, run the install, and generate a corresponding Pipfile.lock file.
This would undermine the concept of Pipfile.lock
(#7) and also encourage people to not commit Pipfile.lock
to svc and view it as an unimportant build artifact (#9).
Edit: I'm okay with the rest of your proposal.
- Bundler automatically writes it to disk at every install. I was convinced by it's ex-maintainer that this is a great idea. That may go.
- In either case, there will be a command to just generate the lockfile.
- The lockfile should almost always go into source control.
-p
could possibly be a default in pip, but not until this is added and battle tested first. -p
is the minimum implementation that would need to be deployed first.