方法1: import pip._internal.pep425tags print(pip._internal.pep425tags.get_supported()) 运行结果: 这样就可以显示pip可以安装库的版本了