Azure DevOps - pip ValueError:HTML 文档类型丢失或不正确

Pet*_*cka 4 pip python-3.x azure-devops

我在 Azure DevOps 中创建了一个包源。一切正常,直到 pip 22.0 版本发布。

现在,当我尝试使用 pip==22.0 从此源安装包时

  File "c:\git_aures_aps\projects\venvs\aures_tools_test_p\lib\site-packages\pip\_internal\index\collector.py", line 427, in _raise_error
    "HTML doctype missing or incorrect. Expected <!DOCTYPE html>.\n\n"
ValueError: HTML doctype missing or incorrect. Expected <!DOCTYPE html>.
Run Code Online (Sandbox Code Playgroud)

当我检查https://pkgs.dev.azure.com/.../_packaging/.../pypi/simple/my-package/时,我发现该网站不以<!DOCTYPE HTML>

在此输入图像描述

如何使用<!DOCTYPE HTML>标签编辑/重新创建 pypi/simple/my-package 存储库?

pra*_*nsg 5

请查看错误消息的其余部分。

ValueError: HTML doctype missing or incorrect. Expected <!DOCTYPE html>.

If you believe this error to be incorrect, try passing the command line option --use-deprecated=html5lib and please leave a comment on the pip issue at https://github.com/pypa/pip/issues/10825.
Run Code Online (Sandbox Code Playgroud)

它会将您带到https://github.com/pypa/pip/issues/10825,其中包含相关指导和信息。它还指出您可以传递--use-deprecated=html5lib给 pip,使其暂时与此页面一起使用。

至于 Azure,您很可能需要联系 Azure 支持,因为他们需要在其终端 IIUC 上修复此问题。