在 docker 容器中构建脚本时,我需要安装外部库。其中一个失败了:
Step 2/6 : RUN pip install paho-mqtt logbook arrow requests ics
---> Running in 93d9144d6224
(...)
ERROR: ics 0.5 has requirement arrow<0.12,>=0.11, but you'll have arrow 0.15.2 which is incompatible.
Installing collected packages: paho-mqtt, logbook, six, python-dateutil, arrow, chardet, certifi, urllib3, idna, requests, ics
Successfully installed arrow-0.15.2 certifi-2019.9.11 chardet-3.0.4 ics-0.5 idna-2.8 logbook-1.5.2 paho-mqtt-1.4.0 python-dateutil-2.8.0 requests-2.22.0 six-1.12.0 urllib3-1.25.5
我不明白这个错误:
版本似乎还可以:0.15.2 >= 0.11
尽管出现错误,但安装“成功”
在任何情况下(无论安装成功与否),此错误都会破坏 docker 构建。
主要问题是为什么首先存在错误?
子问题:
如何解决?
如果构建成功,如何至少暂时强制 docker 构建(这是一个家庭设置)
如果有其他有用的信息,整个构建日志:
Step 1/6 : FROM python:3.7-alpine
---> 39fb80313465
Step 2/6 : RUN pip install paho-mqtt logbook arrow requests ics
---> Running in 93d9144d6224
Collecting paho-mqtt
Downloading https://files.pythonhosted.org/packages/25/63/db25e62979c2a716a74950c9ed658dce431b5cb01fde29eb6cba9489a904/paho-mqtt-1.4.0.tar.gz (88kB)
Collecting logbook
Downloading https://files.pythonhosted.org/packages/6b/3f/f4e6693791efacc1282852fba5392da0649b19416b37422c5489f79a52ea/Logbook-1.5.2.tar.gz (85kB)
Collecting arrow
Downloading https://files.pythonhosted.org/packages/cc/f5/f618f8423fe674a60461e58683edfeead93f4bbf95b9fca0e9699e765b35/arrow-0.15.2-py2.py3-none-any.whl (40kB)
Collecting requests
Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB)
Collecting ics
Downloading https://files.pythonhosted.org/packages/3a/66/7844baa915da9a76ef7b7b6d93935cc1474688c6ea914b90dbe54d6f6f41/ics-0.5-py2.py3-none-any.whl
Collecting python-dateutil (from arrow)
Downloading https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl (226kB)
Collecting chardet<3.1.0,>=3.0.2 (from requests)
暮色呼如
慕姐4208626
相关分类