If you happen to write a lot of python scripts and just want to check which of the added "imports" are actually needed to function - and do not want to use an IDE - just check out https://pypi.org/project/importchecker/ - it comes down to a quick
easy_install importchecker
and afterwards you can check your scripts by using
importchecker myScript.py
It will only output the imports NOT needed, which you can then remove by hand