Build of satnogs-network container fails
Running docker-compose build web
fails with
Step 8/11 : RUN pip install --no-cache-dir --require-hashes --no-deps -r /tmp/requirements/dev.txt
---> Running in a5b971abd3eb
[...]
Installing collected packages: Django, django-shortuuidfield, celery, internetarchive, unicode-slugify, django-autoslug, python-decouple, dj-database-url, opbeat, redis, django-redis-cache, django-braces, django-csp, Pillow, django-compressor, django-allauth, django-avatar, django-crispy-forms, djangorestframework, Markdown, django-filter, MySQL-python, gunicorn, shortuuid, six, Unidecode, urllib3, certifi, olefile, django-appconf, rcssmin, rjsmin, requests, requests-cache, requests-oauthlib, oauthlib, python-openid, lxml, pyephem, pytz, chardet, idna, Unipath, amqp, billiard, kombu, vine, args, docopt, schema, jsonpointer, jsonpatch, clint, backports.csv, sqlparse, flake8, factory-boy, pytest, pytest-cov, pytest-django, coverage, Faker, docopts, mock, configparser, pycodestyle, pyflakes, mccabe, enum34, ipaddress, python-dateutil, appdirs, packaging, py, pyparsing, setuptools, apipkg, execnet, pytest-xdist, funcsigs, pbr, PyYAML, pytest-forked, dnspython, pur, email-validator, text-unidecode, click, attrs, pluggy, orbit
[...]
Found existing installation: ipaddress 1.0.16
Cannot uninstall 'ipaddress'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip install --no-cache-dir --require-hashes --no-deps -r /tmp/requirements/dev.txt' returned a non-zero code: 1
The issue is caused by a new pip version (10) and also described here: https://stackoverflow.com/questions/49932759/pip-10-and-apt-how-to-avoid-cannot-uninstall-x-errors-for-distutils-packages
A simple workaround is to add --ignore-installed
when calling pip install
.