There’s a very simple way to get the list of locally installed Python modules which is:-
help('modules')
You need to type the above command in a Python shell/command prompt.
If you only want to see the currently used modules then you can use the below-mentioned code:-
import sys as s
s.modules.keys()