Wagtail Docker 六个包在升级到 wagtail 1.7 时发生冲突

Wagtail Docker six package conflict on upgrade to wagtail 1.7

我们正在使用 docker 和 docker-compose 到 运行 我们的鹡鸰网站。

我们刚刚升级到 wagtail 1.7,我们收到关于六个包冲突的错误。错误低于

> Found existing installation: setuptools 3.3    Uninstalling
> setuptools-3.3:
>      Successfully uninstalled setuptools-3.3  Running setup.py install for webencodings: started    Running setup.py install for
> webencodings: finished with status 'error'    Complete output from
> command /usr/bin/python -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-mzD35z/webencodings/setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install
> --record /tmp/pip-8DpNx2-record/install-record.txt --single-version-externally-managed --compile:    Traceback (most recent call last):
>      File "<string>", line 1, in <module>
>      File "/tmp/pip-build-mzD35z/webencodings/setup.py", line 35, in <module>
>        packages=find_packages(),
>      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
>        _setup_distribution = dist = klass(attrs)
>      File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 320, in __init__
>        _Distribution.__init__(self, attrs)
>      File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
>        self.finalize_options()
>      File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 386, in finalize_options
>        ep.require(installer=self.fetch_build_egg)
>      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py",
> line 2324, in require
>        items = working_set.resolve(reqs, env, installer, extras=self.extras)
>      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py",
> line 859, in resolve
>        raise VersionConflict(dist, req).with_context(dependent_req)    pkg_resources.VersionConflict: (six 1.5.2
> (/usr/lib/python2.7/dist-packages), Requirement.parse('six>=1.6.0'))

这是 Dockerfile

FROM ubuntu:14.04

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get install -y \
    python-setuptools \
    python-dev \
    python-urllib3 \
    vim \
      libjpeg8-dev \
      zlib1g-dev  \
    libfreetype6-dev  \
    liblcms2-dev  \
    libwebp-dev \
    tcl8.6-dev  \
    tk8.6-dev \
    python-tk \
    libpq-dev \
    libopencv-dev \
    python-opencv \
    python-numpy  \
    xvfb \
    nginx \
    postgresql-client

RUN easy_install pip

# Handle urllib3 InsecurePlatformWarning
RUN apt-get install -y libffi-dev libssl-dev
# RUN pip install requests[security] ndg-httpsclient pyasn1

RUN rm -rf /etc/nginx/sites-available/default
ADD config/nginx/nginx.conf /etc/nginx/nginx.conf


RUN mkdir /code
WORKDIR /code
ADD dev_requirements.txt /code/
RUN pip install -r dev_requirements.txt
ADD . /code/

这里是dev_requirements.txt

django==1.10.5
wagtail==1.6.3
psycopg2>=2.5.2
django-compressor>=2.1
django-libsass>=0.7
raven==5.3.1
django-cas-client==1.2.0
gunicorn==19.6.0
redis==2.10.5
django-redis-cache==1.6.5
elasticsearch==1.0.0
selenium==2.53.6
pyvirtualdisplay==0.2
flake8==3.2.0
honcho==0.7.1

这很好,但是如果我将 wagtail==1.6.3 更改为 wagtail==1.7,我会遇到上述六个包冲突。

有没有人 运行 了解这个问题或者知道是什么导致了这个问题?

看起来像是python模块依赖问题,一个模块依赖6个1.5.2,但是webencodings需要1.6.0。

我也试过升级 pip,但没有任何区别:-(

我会尝试升级我能想到的不会引起问题的模块。

非常感谢任何提示或提示。

Wagtail 在 1.6 和 1.7 之间的依赖项的唯一变化是 un-pin html5lib 从 0.999999 到 'any <1.0 version'。较新版本的 html5lib 似乎对依赖项更挑剔,但 Wagtail 仍应在旧版本上愉快地工作 - 所以我建议将 html5lib==0.999999 添加到你的 dev_requirements.txt.