[英]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
我有這個完全相同的列表。
我們如何解釋這兩者之間的差異?
問題來自使用virtualenv
的virtualenvwrapper
,它具有將安裝默認庫的種子機制。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.