ImportError: No module named ‘pydub’ Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of ImportError: No module named ‘pydub’ without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I am creating a simple script that will use pydub to fetch files from a directory based on their name, then stitch a few of them together and export the result.

I had the script working great in a Windows environment (Win 7, python 3.4), but now I’m trying to run on OSX.

I have installed all necessary components – ffmpeg, libav. I have just installed pydub with pip, pulling directly from github.

My file starts with the input statement from pydub import AudioSegment, and this is what I get:

Traceback (most recent call last):
  File "", line 2, in <module>
    from pydub import AudioSegment
ImportError: No module named 'pydub'

Thoughts? What am I missing? Any help is greatly appreciated!


Check out PEP 0394. You might be running $ python when you need to be running $ python3 If that’s the case, make sure you $ pip3 install pydub, otherwise OSX will not add the package to the right python version.

We are here to answer your question about ImportError: No module named ‘pydub’ - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji