From 2c2a2a3b20e756403f71867cde6538209ae0b428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Hed=C3=A9n?= Date: Thu, 8 Aug 2024 10:43:00 +0200 Subject: [PATCH] Trying to fix debian docker venv issue --- build/docker/debian.Dockerfile | 6 ++---- internal/resolution/pm/pip/cmd_factory.go | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/build/docker/debian.Dockerfile b/build/docker/debian.Dockerfile index d787c40b..8c957782 100644 --- a/build/docker/debian.Dockerfile +++ b/build/docker/debian.Dockerfile @@ -93,7 +93,7 @@ RUN curl -fsSLO https://dot.net/v1/dotnet-install.sh \ ENV GOLANG_VERSION 1.22 RUN apt -y update && apt -y upgrade && apt -y install \ python3 \ - python3-venv \ + python3-pip \ ca-certificates && \ apt -y install -t unstable \ golang-$GOLANG_VERSION \ @@ -104,10 +104,8 @@ RUN apt -y update && apt -y upgrade && apt -y install \ ln -sf /usr/bin/python3 /usr/bin/python && \ # Symlink go binary to bin directory which is in path ln -s /usr/lib/go-$GOLANG_VERSION/bin/go /usr/bin/go -RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3 -RUN python3 -m pip install --upgrade pip - RUN rm /usr/lib/python3.11/EXTERNALLY-MANAGED +RUN python3 -m pip install -user virtualenv RUN dotnet --version diff --git a/internal/resolution/pm/pip/cmd_factory.go b/internal/resolution/pm/pip/cmd_factory.go index c45a93ca..1fdf4904 100644 --- a/internal/resolution/pm/pip/cmd_factory.go +++ b/internal/resolution/pm/pip/cmd_factory.go @@ -33,7 +33,7 @@ type CmdFactory struct { func (cmdf CmdFactory) MakeCreateVenvCmd(fpath string) (*exec.Cmd, error) { python, err := cmdf.execPath.LookPath("python3") - pythonCommand := "python3.11" + pythonCommand := "python3" if err != nil { if strings.Contains(err.Error(), "executable file not found in ") { // Python 3 not found, try Python