[英]Why can't I run dev dependencies after `pipenv install --dev`?
我的项目在它的 Pipfile 中有django-heroku
作为一个package
。
django-heroku
已gunicorn
在其Pipfile作为dev-package
。 见: https : //github.com/heroku/django-heroku/blob/master/Pipfile
我希望在我的项目中运行pipenv install --dev
之后,我可以运行pipenv run gunicorn
。
但它抛出以下错误:
Error: the command gunicorn could not be found within PATH or Pipfile's [scripts].
如果开发依赖项不可用, install --dev
什么install --dev
?
一个答案是包 X 的“开发依赖项”是某人在开发(而不是使用)包 X 时需要的包。
我希望在我的项目中运行 pipenv install --dev 后,...
如果您在项目中使用pipenv install --dev
, pipenv 应该安装开发项目所需的所有包。
如果它一直向下递归安装所有开发依赖项,它可能会引入其他包开发所需的 Python 分析包、测试运行器等。 这些不一定适合开发您的项目的人。
例如,如果我的项目将pytest
列为 dev 依赖项,我会对pipenv
安装的nose
不满意,这可能会在其他一些过时的包中列为 dev 依赖项。
如果您的包的开发人员需要gunicorn
,您应该将其明确列为项目的开发依赖项。
我相信您链接到的Pipfile
仅与此包的开发有关。
但是当安装包时,它通常依赖于setup.py
:
REQUIRED = [
'dj-database-url>=0.5.0', 'whitenoise', 'psycopg2', 'django'
]
如您所见, gunicorn
不见了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.