Home > Software engineering >  Exception has occurred: ModuleNotFoundError even after pip install
Exception has occurred: ModuleNotFoundError even after pip install

Time:02-26

I would like to use html2text in my python script, I've installed it via pip install html2text, and it is now in the %Roaming%\Python\Python310\Scripts.

I can also see it while checking what plugins I have installed and in the visual studio code it's green. However when I run the code this message appears:

This is how it looks in VS Studio Code

CodePudding user response:

So I've found out the solution. It seemed to me like a bug and it was. I had somehow installed some extension from the Windows store - uninstall it, and you should be fine.

CodePudding user response:

In the bottom right of the status bar in VS Code, it will show you which Python environment you're using. You'll need to make sure that you've selected the correct Python installation in VS Code by clicking the Python version in the status bar (make sure it matches with the Python version when you type python into the terminal). If that doesn't work, your Pip could be pointing to the wrong version (run pip -V to find out where it's pointing).

  • Related