错误:
>>> import pip
>>> print(pip.pep425tags.get_supported())
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
print(pip.pep425tags.get_supported())
AttributeError: module 'pip' has no attribute 'pep425tags'
>>>
正确:
>>> import pip._internal
>>> print(pip._internal.pep425tags.get_supported())
[('cp37', 'cp37m', 'win_amd64'), ('cp37', 'none', 'win_amd64'),
('py3', 'none', 'win_amd64'), ('cp37', 'none', 'any'), ('cp3', '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')]
>>>
或者:
>>> import pip; print(pip._internal.pep425tags.get_supported())
[('cp37', 'cp37m', 'win_amd64'), ('cp37', 'none', 'win_amd64'),
('py3', 'none', 'win_amd64'), ('cp37', 'none', 'any'), ('cp3', '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')]
>>>
虽然按python给出的正确匹配格式修改,安装过程中仍然报错