module 'pip' has no attribute 'pep425tags'

前端 未结 9 1663
感动是毒
感动是毒 2020-12-18 00:10

When I am trying to install .whl with pip

it said:

is not a supported wheel on this platform

to solve this problem, I

9条回答
  •  自闭症患者
    2020-12-18 01:03

    I have several versions of Python in my GNU-Linux machine and this causes some problems for me. Python 2.7, 3.4, 3.6, ...

    Too messy! I know. :)

    Each time I used python3 and run this code:

    import wheel.pep425tags
    print(wheel.pep425tags.get_supported())
    

    As yours, I confronted with this error too:

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

    By surfing inside stackoverflow I noticed some problems as below that may help you:

    It's important to know your pip or pip3 is set to which version of Pythons: My mine, pip is set to python 2.7 and pip3 is also set to python 3.6.

    First of all, check the version of your pip or pip3:

    pip -V
    

    or

    pip3 -V
    

    As I use pip3 so it results:

    pip 20.0.2 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
    

    This shows that my pip3 uses python3.6 and this causes me straightly go inside the python3.6 console. In this case it works and results:

    [('cp36', 'cp36m', 'linux_x86_64'), ('cp36', 'abi3', 'linux_x86_64'), ('cp36', 'none', 'linux_x86_64'), ('cp35', 'abi3', 'linux_x86_64'), ('cp34', 'abi3', 'linux_x86_64'), ('cp36', 'none', 'any'), ('cp3', 'none', 'any'), ('cp35', 'none', 'any'), ('cp34', 'none', 'any'), ('cp33', 'none', 'any'), ...]
    

    I hope these steps works for you.

提交回复
热议问题