2

When I run apt-get -y install python3, it installs Python 3.5.2. How can I install Python 3.5.5?

Just to mention that I run these commands in Docker:

RUN apt-get update
RUN apt-get -y install python3 python3-pip wget default-jre
RUN pip3 install --upgrade pip
RUN pip3 install virtualenv

Thanks.

Mozimaki
  • 187
  • 1
  • 7

1 Answers1

2

Two options:

  1. You'll need to find a repository that has that version and add the repository in your container build script. There's a nice explanation of how to add a repository for apt-get on Ask Ubuntu

  2. Build it from source, using the official repository. This is explained on Stack Overflow albeit for a different Python version

Also, if you may be able to find a docker image that already has Python 3.5.5 in it on Docker Hub. I didn't see one with a quick search, but it might be worth a closer look.

Matt Morgan
  • 4,900
  • 4
  • 21
  • 30