module ‘pip’ has no attribute ‘pep425tags’

To print the list of compatible tags with current versions of pip :

$ path/to/pythonX.Y -m pip debug --verbose

The pip debug subcommand is available since v19.2 (July 2019).


To get the list of compatible tags from Python code, I recommend using the packaging library and its packaging.tags.sys_tags() function:

import packaging.tags

tags = packaging.tags.sys_tags()

print('\n'.join([f'{tag.interpreter}-{tag.abi}-{tag.platform}' for tag in tags]))

Leave a Comment