方式一:在python命令中使用命令help('modules')查看
[root@localhost ~]# python
Python 2.7.15 (default, Oct 20 2022, 08:25:27)
[GCC 8.5.0 20210514 (Red Hat 8.5.0-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help('modules')

方式二:使用命令python -m pydoc -p 1234生产网页地址后查看
[root@localhost ~]# python -m pydoc -p 1234
pydoc server ready at http://localhost:1234/
浏览器访问:http://localhost:1234/即可查看。


方式三:使用命令pip list查看,需要提前安装pip模块
[root@localhost ~]# pip -V
pip 20.3.2 from /usr/local/python2.7.15/lib/python2.7/site-packages/pip-20.3.2-py2.7.egg/pip (python 2.7)
[root@localhost ~]# pip list

以上就是Python中已安装模块查看的三种方法了,你学会了吗?