diff --git a/lib/manager/poetry/artifacts.ts b/lib/manager/poetry/artifacts.ts
index 20b6010e77520df12e46f0035445410f40d68f76..9c6c87c508a9e0cce7290e1b5dab3dfc4eaaabc2 100644
--- a/lib/manager/poetry/artifacts.ts
+++ b/lib/manager/poetry/artifacts.ts
@@ -75,13 +75,14 @@ export async function updateArtifacts({
     }
     const tagConstraint = getPythonConstraint(existingLockFileContent, config);
     const poetryRequirement = config.compatibility?.poetry || 'poetry';
+    const poetryInstall = 'pip install ' + quote(poetryRequirement);
     const execOptions: ExecOptions = {
       cwdFile: packageFileName,
       docker: {
         image: 'renovate/python',
         tagConstraint,
         tagScheme: 'poetry',
-        preCommands: ['pip install ' + quote(poetryRequirement)],
+        preCommands: [poetryInstall],
       },
     };
     await exec(cmd, execOptions);