In my case I'm on MacOS trying to make a python script an executable using PyInstaller, I was able to fix this by uninstalling all used modules from my virtual environment and also from my computer. Then I reinstalled each module using the terminal in my virtual environment. After rebuilding it, my executable finally worked.
If you uninstalled from your virtual environment and computer, installed the module only in your virtual environment and keep getting the error, it might be because of another module dependent on it. Try reinstalling those other dependent modules too.