[Python] Error when trying to import pytube into a project even though pytube is installed

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

  1. Stack

    Stack Membro Participativo

    Using Python 3.13.2 and pytube 15.0.0

    When I try to run a program that hasfrom pytube import YouTube I get the following error:


    will.air@Mac python % python3 main.py ../test_text_files/tests.txt Traceback (most recent call last): File "/Users/will.air/YouTube_Downloader/python/main.py", line 3, in from stats.py import download, downloadMulti, audioOnly, audioMulti, getTotalRuntime File "/Users/will.air/YouTube_Downloader/python/stats.py", line 1, in from pytube import YouTube ModuleNotFoundError: No module named 'pytube' will.air@Mac python % pipx install pytube 'pytube' already seems to be installed. Not modifying existing installation in '/Users/will.air/.local/pipx/venvs/pytube'. Pass '--force' to force installation.
    ​

    I've made sure that pytube is installed and in my Python PATH, but it still isn't working.

    Continue reading...

Compartilhe esta Página