笔记
如果您想要
requirements.txt
输出锁文件,请运行$ pipenv lock -r
。但是,这将包括所有哈希值(这很棒!)。要获取requirements.txt
不带哈希值的,请使用$ pipenv run pip freeze
。
根据上述pipenv 通知,如果您想要输出requirements.txt
锁文件,您应该运行$ pipenv lock -r
。但是,-r
选项不存在:
$ pipenv lock -r
Usage: pipenv lock [OPTIONS]
Try 'pipenv lock -h' for help.
$ pipenv lock -h
Usage: pipenv lock [OPTIONS]
Generates Pipfile.lock.
Options:
--categories TEXT
--dev-only Emit development dependencies *only* (overrides
--dev)
-d, --dev Generate both develop and default requirements [env
var: PIPENV_DEV]
--extra-pip-args TEXT
--pre Allow pre-releases.
--python TEXT Specify which version of Python virtualenv should
use.
--clear Clears caches (pipenv, pip). [env var: PIPENV_CLEAR]
-q, --quiet Quiet mode.
-v, --verbose Verbose mode.
--pypi-mirror TEXT Specify a PyPI mirror.
-h, --help Show this message and exit.
requirements.txt
我可以知道获取pipenv 锁文件输出的命令吗?
答案1
您链接到的网站是。官方文档位于pipenv-fork.readthedocs.io/en/latest/basics.html
https://pipenv.pypa.io/en/latest/pipfile.html#pipfile-lock-security-features说:
从锁文件生成 requirements.txt 输出
$ pipenv requirements