-
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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.