Mitigation Steps

ARTIFACTORY: pip install doesn't work with pip 22.x

AuthorFullName__c
Ariel Kabov
articleNumber
000005206
ft:sourceType
Salesforce
FirstPublishedDate
2022-01-30T17:01:56Z
lastModifiedDate
2024-03-10T07:43:56Z
VersionNumber
9

1. Upgrade your pip client to version 22.0.2 which includes an automatic fallback to use html5lib.


2. Using pip 22.0.1 or above, follow one of the below methods to use the html5lib:

a. Set this environment variable: PIP_USE_DEPRECATED=html5lib

b. Use this flag in your install commands: --use-deprecated=html5lib


3. Alternatively, you can downgrade the pip client using one of the methods:

  • Downgrade to the latest pip version prior to the breaking change:
$ pip3 install --no-cache --upgrade pip==21.3.1 -i https://pypi.org/simple/
Note. The downgrade command requires access to pypi.org, as you won't be able to downgrade by installing the package from Artifactory due to the HTML doctype mismatch issue.
  • If you don't have access to pypi.org, you can uninstall pip entirely and install the pip version that is bundled with your Python version:
$ python3 -m pip uninstall pip  
$ python3 -m ensurepip