Wagtail Docker六包冲突升级为wagtail 1.7

时间:2017-02-14 08:54:31

标签: python-2.7 ubuntu docker wagtail six

我们正在使用docker和docker-compose来运行我们的wagtail网站。

我们刚刚升级到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 to wagtail == 1.7我会得到上述六个包冲突。

有没有人碰到这个或者有什么可能导致问题的原因?

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

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

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

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

1 个答案:

答案 0 :(得分:2)

对Wagtail在1.6和1.7之间的依赖关系的唯一变化是从0.999999解除html5lib到任何&lt; 1.0版本&#39;。较新版本的html5lib似乎对依赖关系更加挑剔,但Wagtail应该仍然可以在旧版本上使用 - 所以我建议将html5lib==0.999999添加到dev_requirements.txt。