Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

module 'pip' has no attribute 'pep425tags'

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 repl

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

with this I can see the tags and versions that pip supports

However, when I input this code, it said:

AttributeError: module 'pip' has no attribute 'pep425tags'

What's wrong?

(pip 10.0.1 on python 3.6)

like image 527
Alina Avatar asked May 09 '18 08:05

Alina


2 Answers

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
like image 150
sinoroc Avatar answered Sep 29 '22 12:09

sinoroc


This worked for me with Python 2.7 (in a virtualenv using that version):

import wheel.pep425tags

print(wheel.pep425tags.get_supported())
like image 45
Paul Harmon Avatar answered Sep 29 '22 10:09

Paul Harmon