My project has django-heroku
in its Pipfile as a package
.
django-heroku
has gunicorn
in its Pipfile as a dev-package
. See: https://github.com/heroku/django-heroku/blob/master/Pipfile
I would expect that after running pipenv install --dev
in my project, I could then run pipenv run gunicorn
.
But it throws the following error:
Error: the command gunicorn could not be found within PATH or Pipfile's [scripts].
If dev dependencies aren't available, what's the point of install --dev
?
If you use pipenv install --dev in your project, pipenv should install all the packages that are required to develop your project. If it recursively installed all dev dependencies all the way down, it might pull in Python profiling packages, test runners, etc., that other packages need for development.
To see installed packages with Pipenv, you can use the pipenv graph command. The output from this is perhaps more verbose than you'd like, but it does contain everything you need.
To activate the environment, just navigate to your project directory and use pipenv shell to launch a new shell session or use pipenv run <command> to run a command directly.
pipenv sync will install the exact versions specified in Pipfile. lock. I would say sync is better for getting your environment to match what is checked in, and install is for when you want to get the latest versions, or are adding new dependencies that aren't in the lock file yet.
One answer is that the "dev dependencies" of package X are the packages someone would need if they were developing (as opposed to using) package X.
I would expect that after running pipenv install --dev in my project, ...
If you use pipenv install --dev
in your project, pipenv should install all the packages that are required to develop your project.
If it recursively installed all dev dependencies all the way down, it might pull in Python profiling packages, test runners, etc., that other packages need for development. Those wouldn't necessarily be appropriate for someone developing your project.
As an example, if my project listed pytest
as a dev dependency , I would be unhappy in pipenv
installed nose
, which could be listed as an dev depenedency in some other, out-of-date package.
If developers of your package need gunicorn
, you should list it explicitly as a dev dependency of your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With