[Python] how to fix python packages

Discussão em 'Python' iniciado por Stack, Agosto 23, 2025.

  1. Stack

    Stack Membro Participativo

    the package is reported as installed, but python cannot find it.

    sudo pip3 install beautifulsoup4
    [sudo] password for stephen:
    Requirement already satisfied: beautifulsoup4 in /usr/lib/python3/dist-packages (4.10.0)


    In my python buffer I see I am running Python 3.10.12 (main, May 27 2025, 17:12:29) [GCC 11.4.0] on linux and

    >>> from bs4 import BeautifulSoup
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/home/stephen/progs/python/kaggle/scrape.py", line 2, in <module>
    from bs4 import BeautifulSoup
    ModuleNotFoundError: No module named 'bs4'


    my folders show:

    /usr/lib/python3
    /usr/lib/python3.10
    /usr/lib/python3.11


    and only python3 has a dist-packages folder in it. How do I fix this?

    Continue reading...

Compartilhe esta Página