Build fails on step 5/25 with error code 1
Askleapeos opened this issue · 3 comments
Expected Behavior
It should complete building.
Current Behavior
After executing $ docker-compose -f local.yml build
per manual, it fails with error code 1 on step 5/25.
This is the error:
Step 5/21 : RUN python3.6 get-pip.py
---> Running in 13b3cd635736
Traceback (most recent call last):
File "get-pip.py", line 20649, in <module>
main()
File "get-pip.py", line 197, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip._internal
File "/tmp/tmp_qu4qa61/pip.zip/pip/_internal/__init__.py", line 42, in <module>
File "/tmp/tmp_qu4qa61/pip.zip/pip/_internal/cmdoptions.py", line 16, in <module>
File "/tmp/tmp_qu4qa61/pip.zip/pip/_internal/index.py", line 25, in <module>
File "/tmp/tmp_qu4qa61/pip.zip/pip/_internal/download.py", line 35, in <module>
File "/tmp/tmp_qu4qa61/pip.zip/pip/_internal/locations.py", line 10, in <module>
ImportError: cannot import name 'sysconfig'
ERROR: Service 'base' failed to build: The command '/bin/sh -c python3.6 get-pip.py'
returned a non-zero code: 1
Solution
According to this source (https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1773794); there is a bug, or should I say a new requirement, in Ubuntu 18.04. So, we just have to add “python3-distutils” in the installation packages of the file .\concept-to-clinic-master\compose\base\Dockerfile-dev
and everything builds fine. The final file should look like this:
RUN apt-get update && apt-get install -y tcl tk python3.6 python3.6-tk wget python-opencv python3-distutils
Steps to Reproduce
http://concept-to-clinic.readthedocs.io/en/latest/developing-locally-docker.html#run-tests
- $ docker-compose -f local.yml build
Context (Environment)
It should affect all platforms.
Checklist before submitting
- I have confirmed this using the officially supported Docker Compose setup using the
local.yml
configuration and ensured that I built the containers again and they reflect the most recent version of the project at theHEAD
commit on themaster
branch - I have searched through the other currently open issues and am confident this is not a duplicate of an existing bug
- I provided a minimal code snippet or list of steps that reproduces the bug.
- I provided screenshots where appropriate
- I filled out all the relevant sections of this template
sudo apt-get install python3-distutils
I met exactly the same problem while running the bulid command on my macOS 10.13, what should I do to fix it? It seems that there's no python3-distutils on mac platform.