[Python] ModuleNotFoundError: No module named 'pydub'

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

  1. Stack

    Stack Membro Participativo

    I am trying to run some python code for a tutorial I am following and it requires the "pydub" library to manipulate some audio files.

    In my main.py file, at the top of the file I have the following:

    from pydub import AudioSegment
    from pydub.utils import make_chunks


    But when I run the code, it shows the following error:

    from pydub import AudioSegment
    ModuleNotFoundError: No module named 'pydub'
    An error occurred while running the flow: Command '['uv', 'run', 'kickoff']' returned non-zero exit status 1.


    I am using a conda virtual environment and I have run pip3 install pydub and also python -m pip install pydub and even though it says the installation is successful, both do not work.

    I also have two python folders at the following path: ~/Library/Python the folders are 3.9 and 3.11.

    The ~/Library/Python/3.11/lib/python/site-packages has only a few folders in it, none of which are pydub. The pydub folder does exist in the ~/Library/Python/3.9/lib/python/site-packages folder.

    I am fairly new to coding and was hoping someone might know how to resolve the issue or point me in the right direction.

    Continue reading...

Compartilhe esta Página