ERROR: *** is not a supported wheel on this platform

created at 11-24-2021 views: 1

problem analysis

An error occurred when pip installed whl:

ERROR: *** is not a supported wheel on this platform

This is because pip will check whether it is suitable for the current environment according to the naming of whl. Two situations may cause this error:

  1. The environment is adapted, but the verification fails due to the self-modified whl name;
  2. whl does not fit the environment.

solution

For case 1, just change the name; for case 2, refer to the following scheme.

This is caused by a mismatch between this whl and the system python version. At this time, we need to find the whl naming format required by the current python version. There are many tutorials on the Internet that provide ways to view the names of whl supported by python.

However, the online tutorial is very old. After following the online tutorial, it will prompt pip has no attribute pep425tags. After many times of collecting information and trying, I finally found the commands available in `pip 20.0` and other versions!

known invalid method

First list the methods that are invalid for the newer version of pip. If you are using a newer version of pip, using the following python statements will prompt pip has no attribute pep425tags.
Invalid old tutorial one:

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

Invalid old tutorial two:

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

The above is a large number of tutorials on the Internet. These are the tutorials of the old version of pip, which are not applicable to pip 20.0 and above, and even not applicable to the version near pip 20.0.
Using the above old tutorial, you will get pip has no attribute pep425tags. As shown below.

Here, after a large amount of information and attempts by the blogger, he finally found a method available on the pip 20.0 version.

tested and valid commands

We can use the following command, which has been tested and effective, to see which files match the current Python version.
The valid commands are as follows (enter directly on the command line, do not enter into the Python interpreter):

pip debug --verbose

After entering this command, a lot of information will be output:

pip version: pip 20.1.1 from /home/pi/Softwares/venv3/lib/python3.7/site-packages/pip (python 3.7)
sys.version: 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0]
sys.executable: /home/pi/Softwares/venv3/bin/python
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: linux
sys.implementation:
name: cpython
‘cert’ config value: global
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /home/pi/Softwares/venv3/lib/python3.7/site-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
appdirs1.4.3
CacheControl0.12.6
colorama0.4.3
contextlib20.6.0.post1 (Unable to locate actual module version, using vendor.txt specified version)
distlib0.3.0
distro1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
html5lib1.0.1
ipaddress1.0.23
msgpack1.0.0 (Unable to locate actual module version, using vendor.txt specified version)
packaging20.3
pep5170.8.2
progress1.5
pyparsing2.4.7
requests2.23.0
certifi2020.04.05.1
chardet3.0.4
idna2.9
urllib31.25.8
resolvelib0.3.0
retrying1.3.3 (Unable to locate actual module version, using vendor.txt specified version)
setuptools44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
six1.14.0
toml0.10.0
webencodings0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 44
cp37-cp37m-manylinux2014_armv7l
cp37-cp37m-linux_armv7l
cp37-abi3-manylinux2014_armv7l
cp37-abi3-linux_armv7l
cp37-none-manylinux2014_armv7l
cp37-none-linux_armv7l
cp36-abi3-manylinux2014_armv7l
cp36-abi3-linux_armv7l
cp35-abi3-manylinux2014_armv7l
cp35-abi3-linux_armv7l
cp34-abi3-manylinux2014_armv7l
cp34-abi3-linux_armv7l
cp33-abi3-manylinux2014_armv7l
cp33-abi3-linux_armv7l
cp32-abi3-manylinux2014_armv7l
cp32-abi3-linux_armv7l
py37-none-manylinux2014_armv7l
py37-none-linux_armv7l
py3-none-manylinux2014_armv7l
py3-none-linux_armv7l
py36-none-manylinux2014_armv7l
py36-none-linux_armv7l
py35-none-manylinux2014_armv7l
py35-none-linux_armv7l
py34-none-manylinux2014_armv7l
py34-none-linux_armv7l
py33-none-manylinux2014_armv7l
py33-none-linux_armv7l
py32-none-manylinux2014_armv7l
py32-none-linux_armv7l
py31-none-manylinux2014_armv7l
py31-none-linux_armv7l
py30-none-manylinux2014_armv7l
py30-none-linux_armv7l
cp37-none-any
py37-none-any
py3-none-any
py36-none-any
py35-none-any
py34-none-any
py33-none-any
py32-none-any
py31-none-any
py30-none-any

From it we can see the words Compatible tags, these are the tags that can be adapted to the current Python version. For example, my Python version is 3.7.3, which can match the following file names:

Compatible tags: 44
cp37-cp37m-manylinux2014_armv7l
cp37-cp37m-linux_armv7l
cp37-abi3-manylinux2014_armv7l
cp37-abi3-linux_armv7l
cp37-none-manylinux2014_armv7l
cp37-none-linux_armv7l
cp36-abi3-manylinux2014_armv7l
cp36-abi3-linux_armv7l
cp35-abi3-manylinux2014_armv7l
cp35-abi3-linux_armv7l
cp34-abi3-manylinux2014_armv7l
cp34-abi3-linux_armv7l
cp33-abi3-manylinux2014_armv7l
cp33-abi3-linux_armv7l
cp32-abi3-manylinux2014_armv7l
cp32-abi3-linux_armv7l
py37-none-manylinux2014_armv7l
py37-none-linux_armv7l
py3-none-manylinux2014_armv7l
py3-none-linux_armv7l
py36-none-manylinux2014_armv7l
py36-none-linux_armv7l
py35-none-manylinux2014_armv7l
py35-none-linux_armv7l
py34-none-manylinux2014_armv7l
py34-none-linux_armv7l
py33-none-manylinux2014_armv7l
py33-none-linux_armv7l
py32-none-manylinux2014_armv7l
py32-none-linux_armv7l
py31-none-manylinux2014_armv7l
py31-none-linux_armv7l
py30-none-manylinux2014_armv7l
py30-none-linux_armv7l
cp37-none-any
py37-none-any
py3-none-any
py36-none-any
py35-none-any
py34-none-any
py33-none-any
py32-none-any
py31-none-any
py30-none-any

This is a real solution to the invalid problem of the old online tutorials. Suitable for new versions of pip such as pip 20.0.

notice

Previously, the invalid method in the old version was the Python statement, but this time the effective command was the pip command, type it directly on the command line, don’t type it in the Python interpreter!
After finding the tags supported by python, go and download the corresponding version to install it~

Please log in to leave a comment.