I have been trying to fix this error for days and I am running out of ideas.
I am working on a webapp and I tried to install socketIO to try it out. Every since I attempted to install that package, I keep getting the "AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'" message for almost anything I do. I get the error when I try to install a package. I get the error when I try to start the app by running "flask run"
I've tried to start other projects with a different venv but I still get the same error for every single one of those.
"python3 -m ensurepip --upgrade" returns "Requirement already up-to-date" I tried to uninstall setuptools but when I try to reinstall it gives me the same attributeerror aswell. I manually downloaded pip3 and installed it as discribed in this answer https://stackoverflow.com/a/60778810/17014170 I even tried to reinstall my coding program because I thought there might be an error with it. But nothing worked. I can't run any of my programs and I'm starting to get desperate. Does anybody know how to get rid of this error? I don't need to install socketIO or any other package anymore, I just need to be able to use "flask run" again to run my apps.
I am working on Windows 10 with Python 3.7
Edit: I've installed Python 3.9 and created a new venv. My programs work with that. I'd still like to know if there is any way to fix my 3.7 python installation, if anyone has any ideas.