module 'pip' has no attribute 'pep425tags'

Alina picture Alina · May 9, 2018 · Viewed 11.8k times · Source

When I am trying to install .whl with pip

it said:

is not a supported wheel on this platform

to solve this problem, I searched the Internet and it said I can input this into shell

import pip; print(pip.pep425tags.get_supported())

with this I can get the documents and versions that pip supports

However, when I input these code, it said:

module 'pip' has no attribute 'pep425tags'

What's wrong?

Answer

sinoroc picture sinoroc · Mar 12, 2020

If the goal is simply to get the list of compatible tags, then with current versions of pip (for example 20.0.2):

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