Problem analysis:
Error installing whl from pip:
ERROR: *** is not a supported wheel on this platform
This is because pip will verify whether it is suitable for the current environment according to the name of whl. Two situations may lead to this error:
1. Environment adaptation, but the verification fails due to the self modified naming of whl;
2. whl does not fit the environment.
Solution:
For 1, rename it; For 2, refer to the following scheme.
This is caused by the mismatch between this whl and the python version of the system. At this time, we need to find the whl naming format required by the current Python version. Many tutorials on the Internet provide methods to view the whl names supported by python.
However, the online tutorial is very old. After following the online tutorial, you will be prompted with pip has no attribute pep425tags. After collecting data and trying for many times, I finally found the commands available in pip 20.0 and other versions!
1 known invalid method
First, list the methods that are not valid for the newer version of pip. If you are using a newer version of pip, the following python statements will prompt pip has no attribute pep425tags.
Invalid old tutorial 1:
import pip print(pip.pep425tags.get_supported())
Invalid old tutorial 2:
import pip._internal print(pip._internal.pep425tags.get_supported())
The above is a large number of tutorials on the Internet. These are tutorials of the old version of pip. They are not applicable to pip 20.0 and above, or even to versions close to pip 20.0.
Using the old tutorial above, you will get pip has no attribute pep425tags. As shown in the figure below.
Here, after a lot of data collection and attempts by bloggers, we finally found the methods available on pip 20.0.
2 tested valid commands
We can check which files match the current Python version through the following tested and effective command.
The valid commands are as follows (enter them directly on the command line, not on 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
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 problem that the old online tutorials are invalid. It is applicable to new versions of pip such as pip 20.0.
3 attention
The invalid method in the previous version was Python statement, and the valid command this time is pip command. Enter it directly on the command line, not in the Python interpreter!
After finding the label supported by python, download the corresponding version and install it ~