首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >setuptools位于Dockerfile中的v3.3上,但实际上在v20.7.0上。

setuptools位于Dockerfile中的v3.3上,但实际上在v20.7.0上。
EN

Stack Overflow用户
提问于 2018-04-12 21:13:27
回答 1查看 491关注 0票数 0

我在Ubuntu16.04中运行以下命令:

代码语言:javascript
复制
git clone git@github.com:liveblog/liveblog.git
cd liveblog
docker build .

这给了我以下输出:

代码语言:javascript
复制
[.....]
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 listpip list返回检查setuptools的安装版本:

代码语言:javascript
复制
[...]
setuptools (20.7.0)
[...]

我在Dockerfile中添加了下面一行就在RUN cd /tmp && pip3 install -U -r /tmp/requirements.txt之前

代码语言:javascript
复制
RUN pip3 list

然后当我负责码头建设时。同样,我得到了以下输出:

代码语言:javascript
复制
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上,我如何能够保存这种行为?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-04-13 11:15:46

我假设您一定是在检查主机上的安装工具,也就是说(20.7.0),

然而,它应该已经升级到内部码头-形象。(就像你说的那样,在你的码头图像里: 3.3。

试着用这个代替你的指示,或者任何更合适的方法。

代码语言:javascript
复制
#> RUN cd /tmp && pip3 install -U setuptools && pip3 list && pip3 install -U -r /tmp/requirements.txt

这将解决与setuptools版本相关的当前问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49805961

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档