Installing Python 3 Docker Ubuntu error command 'x86_64-linux-gnu-gcc

I’m trying to create a dockerfile that uses Python 3.

FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -y python3 python3-dev python-pip
RUN apt-get install -y libxml2-dev libxslt1-dev libpq-dev libjpeg-dev libfreetype6-dev zlib1g-dev
RUN cd /var/projects/apps && pip install -r requirements.txt

I get the error fatal error: Python.h: No such file or directory when trying to install pillow in my requirements, why and I’m I installing python 3 correctly?

  • Docker swarm issue connection refused on manage
  • Is it possible to pass on additional options to docker start like (port forwarding, capabilities)
  • docker-compose - externalize spring
  • Is it possible to use Google Containers privately not in the Cloud?
  • Downgrade to PHP 5.4.45 in Phusion Docker
  • How can I create predictive mappings between network interface names and bridged networks in docker
  • error:
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    Cleaning up...
    Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pillow/';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-C7CMih-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pillow
    Storing debug log for failure in /root/.pip/pip.log
    INFO[0102] The command [/bin/sh -c cd /var/projects/app && pip install -r requirements.txt] returned a non-zero code: 1

  • Missing files after docker commit
  • How to fit docker in this architecture?
  • Docker push fails with fatal error msg=“”
  • Localhost not working with Docker+Wordpress in MacOS
  • How Can I install `passenger-install-nginx-module` via Dockerfile
  • Docker running multiple Apache instances
  • One Solution collect form web for “Installing Python 3 Docker Ubuntu error command 'x86_64-linux-gnu-gcc”

    You should install python3-pip in your Dockerfile and then run pip3 install -r requirements.txt

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.