[Python] Getting "module not found" for bs4 in venv with module installed

Discussão em 'Python' iniciado por Stack, Março 28, 2025.

  1. Stack

    Stack Membro Participativo

    I've activated my venv and installed BeautifulSoup4, when I pip list I have beautifulsoup4 installed, and my VSCode autofills the import for bs4.

    I'm in the correct venv, my Python is the correct version (bs4 was installed with py -m pip install beautifulsoup4), bs4 is in my .venv/Lib/site-packages, when I py -m pip install beautifulsoup4 in my active environment, it says requirements are met.

    Am I doing something wrong? VS Code says it's installed, I can see it in my activated environment, it seems like it should just let me import, but for some reason it won't.

    Create & activate venv.

    py -m pip install beautifulsoup4, import bs4.

    Expected it to let me import bs4, but getting no module error.

    Can't see any dependencies in bs4 that would clash at all. Python version is 3.13 and pip version is 25.0.1

    Continue reading...

Compartilhe esta Página