I have also faced this problem, and although I tried the solutions, I kept getting the same error.
I restarted the notebooks kernel. and it tried the solutions again. It WORKED  . I just wanted to mention this maybe one of you face the same thing