我在Ubuntu16.04中运行以下命令:
git clone git@github.com:liveblog/liveblog.git
cd liveblog
docker build .这给了我以下输出:
[.....]
Downloading/unpacking jmespath>=0.7.1,<1.0.0 (from boto3>=1.1.4,<1.5->Superdesk-Core->-r /tmp/requirements.txt (line 10))
Downloading jmespath-0.9.3-py2.py3-none-any.whl
Downloading/unpacking cryptography>=2.1.4 (from pyOpenSSL->flask-sentinel>=0.0.4,<0.1->Superdesk-Core->-r /tmp/requirements.txt (line 10))
Running setup.py (path:/tmp/pip_build_root/cryptography/setup.py) egg_info for package cryptography
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/cryptography/setup.py", line 28, in <module>
"cryptography requires setuptools 18.5 or newer, please upgrade to a "
RuntimeError: cryptography requires setuptools 18.5 or newer, please upgrade to a newer version of setuptools
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/cryptography/setup.py", line 28, in <module>
"cryptography requires setuptools 18.5 or newer, please upgrade to a "
RuntimeError: cryptography requires setuptools 18.5 or newer, please upgrade to a newer version of setuptools
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/cryptography
Storing debug log for failure in /root/.pip/pip.log
The command '/bin/sh -c cd /tmp && pip3 install -U -r /tmp/requirements.txt' returned a non-zero code: 1通过pip3 list和pip list返回检查setuptools的安装版本:
[...]
setuptools (20.7.0)
[...]我在Dockerfile中添加了下面一行就在RUN cd /tmp && pip3 install -U -r /tmp/requirements.txt之前
RUN pip3 list然后当我负责码头建设时。同样,我得到了以下输出:
Step 20/27 : RUN pip3 list
---> Running in 391e5e5e490b
chardet (2.2.1)
colorama (0.2.5)
html5lib (0.999)
lxml (3.3.3)
pip (1.5.4)
requests (2.2.1)
setuptools (3.3)
six (1.5.2)
urllib3 (1.7.1)为什么setuptools现在在v3.3上,我如何能够保存这种行为?
发布于 2018-04-13 11:15:46
我假设您一定是在检查主机上的安装工具,也就是说(20.7.0),
然而,它应该已经升级到内部码头-形象。(就像你说的那样,在你的码头图像里: 3.3。
试着用这个代替你的指示,或者任何更合适的方法。
#> RUN cd /tmp && pip3 install -U setuptools && pip3 list && pip3 install -U -r /tmp/requirements.txt这将解决与setuptools版本相关的当前问题。
https://stackoverflow.com/questions/49805961
复制相似问题