知识卡片
锁文件固定依赖版本
Pipfile 描述希望建立的 Python 环境,Pipfile.lock 记录实际解析出的确切包版本。使用锁文件安装可减少不同环境拿到不同依赖版本的偏差;这提升依赖可复现性,但不保证操作系统、外部服务或运行配置也相同。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Microservice APIs》第 2 章《A basic API implementation》(源文件:_epub-src/OEBPS/Text/02.htm)
- 结论依据:2.3 节区分 Pipfile 的目标环境描述与 Pipfile.lock 的精确版本记录,并明确说明锁文件使各环境安装相同依赖版本。
- 原始内容:Pipenv is a dependency management tool for Python that guarantees that the same versions of our dependencies are installed in different environments. In other words, Pipenv makes it possible to create environments in a deterministic way. To accomplish that, Pipenv uses a file called Pipfile.lock, which contains a description of the exact package versions that were installed.