繁体   English   中英

Pip 冻结在 docker 镜像没有与本地安装相同的结果

[英]Pip freeze in docker image does not have the same result as the local installation

我有一个包含这些库的依赖文件:

boto3==1.14.14
Django==3.0.8
django-cors-headers==3.4.0
django-filter==2.3.0
django-guardian==2.3.0
django-storages==1.9.1
djangorestframework==3.11.0
djangorestframework-gis==0.15
djangorestframework-guardian==0.3.0
djangorestframework-simplejwt==4.4.0
Pillow==7.2.0
psycopg2==2.8.5
python-dotenv==0.13.0
uWSGI==2.0.19

When I install it in a clean local virtualenv ( python 3.7 and pip upgraded) using virtualenvwrapper , the pip freeze command returns a list of dependencies which is not the same one if I install the requirements in a python:3.7-slim or python:3.7 docker 映像(也升级了 pip)。 docker 容器中分歧的库是:

appdirs==1.4.3
CacheControl==0.12.6
certifi==2019.11.28
chardet==3.0.4
colorama==0.4.3
contextlib2==0.6.0
distlib==0.3.0
distro==1.4.0
html5lib==1.0.1
idna==2.8
ipaddr==2.2.0
lockfile==0.12.2
msgpack==0.6.2
packaging==20.3
pep517==0.8.2
pkg-resources==0.0.0
progress==1.5
pyparsing==2.4.6
pytoml==0.1.21
requests==2.22.0
retrying==1.3.3
webencodings==0.5.1

这些库似乎是在我设置本地环境时安装的。 如果我重新创建一个全新的环境并运行pip freeze我有这个完全相同的列表。

我们如何解释这两者之间的差异?

问题来自使用virtualenvvirtualenvwrapper ,它具有将安装默认库的种子机制。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM