These steps solved my issue:
Virtual Environment
Jupyter Notebook
python file
As the problem was solved by fresh installation of the dependencies, Most probably I faced the issue because of some internal dependency conflict.