查看模块的版本有两种方法,具体如下
1.模块名.version:
>>> import requests
>>> requests.__version__
'2.18.4'
2.help(模块名) 看大概倒数的 VERSION 即版本号
>>>help(requests)
...
VERSION
2.18.4
AUTHOR
Kenneth Reitz
FILE
d:\python\python35\lib\site-packages\requests\__init__.py
本文介绍了两种检查Python模块版本的方法:使用模块名.version属性直接获取版本号,以及通过help(模块名)查看详细信息中的VERSION字段来确定版本。
722

被折叠的 条评论
为什么被折叠?



