之前常用这行命令生成 requirements 文件:
pipenv lock -r > requirements.txt && pipenv lock --dev-only -r > requirements-dev.txt
现在发现,pipenv 开始 deprecated 这个 -r
参数了。
Warning: The lock flag -r/--requirements will be deprecated in a future version
of pipenv in favor of the new requirements command. For more info see
https://pipenv.pypa.io/en/latest/advanced/#generating-a-requirements-txt
NOTE: the requirements command parses Pipfile.lock directly without performing any
locking operations. Updating packages should be done by running pipenv lock.
按照官网建议,以后应该:
pipenv requirements > requirements.txt && pipenv requirements --dev-only > requirements-dev.txt
不用 lock,效率更好。