4

I am trying to install python3.8 in my container. My base image is rocker/shiny. I was able to build my image and start my container two weeks ago successfully, but am unable to do so today and am getting the following error message:

E: Unable to locate package python3.8 E: Couldn't find any package by regex 'python3.8'

Furthermore, other folks who try to build this Dockerfile on their computers are getting the same error message.

Here is my Dockerfile

# base image
FROM rocker/shiny:3.3.2

RUN apt-get update && apt-get install -y \
    sudo \
    python3.8 \
    python3-dev \
    libpq-dev \
    python3-pip \
    libxml2-dev

COPY . /srv/shiny-server/app

WORKDIR /srv/shiny-server/app

RUN pip3 install --no-cache-dir -r requirements.txt

EXPOSE 3838

CMD ["R", "-e", "shiny::runApp('/srv/shiny-server/app',port = 3838, host = '0.0.0.0')"]

What I've tried:

-Changing python3.8 to python3.8-venv

-Changed rocker/shiny:latest to rocker/shiny:3.3.2

prettypython
  • 103
  • 1
  • 5
  • 2
    try `libpython3.8-dev` – jwjhdev Jan 13 '21 at 14:58
  • Can you explain what that does? – prettypython Jan 13 '21 at 15:03
  • `rocker/shiny` is [based on `rocker/r-ver:3.6.3`](https://github.com/rocker-org/shiny/blob/master/Dockerfile#L1) which is [based on `debian:buster`](https://github.com/rocker-org/rocker-versioned/blob/master/r-ver/3.6.3.Dockerfile#L1) which *does* have [`python3`](https://packages.debian.org/search?suite=buster&keywords=python3) (3.7) but *does not* have [`python3.8`](https://packages.debian.org/search?suite=buster&keywords=python3.8). For that, might I suggest https://stackoverflow.com/q/62830862/3358272? Likely not what you wanted to hear ... other solutions likely exist w/o need for `gcc`. – r2evans Jan 13 '21 at 15:17

0 Answers0