I was using pycharm and for me it kept showing this error, to a point i reinstalled everything.
For me what i did was i made a requirements.txt
and put the required package/library there and then on my main.py
file it showed a prompt that these are missing (even though it showed in terminal that successfully installed before when the error was occurring continually)
Then i also updated pip and again retried manually installing requirements.txt using pip install -r requirements.txt
This finally worked, I am not sure if pip was a problem or whatever. I do not know why this keeps occurring again and again. if someone do get to know please do let me know.