diff --git a/lib/datasource/pypi/index.ts b/lib/datasource/pypi/index.ts
index 149dd5238056200d57f9eb0b6172da023b61a1d5..b6eafd7707c8e630712567a3b0f4c4a3a5e3ed75 100644
--- a/lib/datasource/pypi/index.ts
+++ b/lib/datasource/pypi/index.ts
@@ -108,7 +108,7 @@ async function getSimpleDependency(
       logger.debug({ dependency: depName }, 'pip package not found');
       return null;
     }
-    const root: HTMLElement = parse(dep) as any;
+    const root: HTMLElement = parse(dep.replace(/<\/?pre>/, '')) as any;
     const links = root.querySelectorAll('a');
     const versions = new Set<string>();
     for (const link of Array.from(links)) {