Search code examples
pythonvisual-studio-codebeautifulsoupvirtual-environment

pyhton vscode venv ModuleNotFoundError: No module named 'bs4'?


I'm in my virtual environment in vscode, installed beautifulsoup, and I can see the latest version file in the virtual environment files, and I'm running the notebook yet it gives the error of ModuleNotFoundError: No module named 'bs4', any help here?

NB: when I write pip show beautifulsoup4, it gives me all the details about the package version 4.11.1

I pip install beautifulsoup4 and pip install bs4


Solution

  • Make sure the interpreter version you are using is the same environment where you installed the bs4 package.

    • Click on the python version at the top right of the jupyter notebook

      enter image description here

    • Select the interpreter environment where the bs4 package is installed

      enter image description here