-
what is pipfile
From pipfile: the replacement for requirements.txt ,
Pipfile
and its sisterPipfile.lock
are a replacement for the existing standardpip's
requirements.txt
file.From PyCharm Use pipfile, Pipfile is the dedicated file used by the Pipenv virtual environment to manage project dependencies. This file is essential for using Pipenv. When you create a Pipenv environment either for a new or an existing project, the Pipfile is generated automatically.
-
requirements.txt
文本文件,列出所有需要安装的模块,通过
pip install -r requirements.txt
一次性安装。 -
pipfile
From Real Python, the syntax for the Pipfile is TOML, and the file is separated into sections.:
- [dev-packages] for development-only packages
- [packages] for minimally required packages
- [requires] for other requirements like a specific version of Python
-
pipfile.lock
提供版本锁支持
pip freeze -p Pipfile # 生成Pipfile.lock
-
pip与pipenv
pip是python distribution官方标准库,pipenv是Python Packaging User Guide(PyPA)官方推荐的。
经常看到很多地方都说是官方,其实不是一个主体。
Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the Python world.
Windows is a first-class sitizen, in our world.
(About First-class citizen) -
References
Python理解pip、pipfile、pipenv、requirements.txt
最新推荐文章于 2023-11-14 22:53:06 发布