Open
Description
查看 pip 支持的版本方法
源地址:https://blog.csdn.net/qq_38161040/article/details/103881372
方法一
pip debug --verbose
方法二
64 位 pip 老的查看方法前段时间更新后就不能用了。
之前导·pip._internal
就好了。
现在需要导入pip._internal.pep425tags
才可以。
>>> import pip._internal.pep425tags
>>> print(pip._internal.pep425tags.get_supported())
[('cp36', 'cp36m', 'win32'), ('cp36', 'none', 'win32'), ('py3', 'none', 'win32')
, ('cp36', 'none', 'any'), ('cp3', 'none', 'any'), ('py36', 'none', 'any'), ('py
3', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', '
none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none'
, 'any')]
>>>
方法三
我们直接在 pip 里搜 pep425tags.py 这个文件就行,找到它的位置。
一般导入报错就说明位置不对,每个版本都可能有一些差异,位置可能有变化。
我下载了个 32 位的,查找发现了它的位置,然后直接导入它就行了。
补充
Windows 平台可以在这里下载第三方库:https://www.lfd.uci.edu/~gohlke/pythonlibs/