Am I doing wrong ! Is this not very basic?

import pydub not working

Did you try the following?

%pip install numpy
%pip install pydub
%pip show pydub

You want the special magic symbol and not an exclamation point.



Context

The magic pip command variation was added in 2019 to ensure the install occurs in the environment where the kernel is running that backs the active notebook.

The exclamation point in combination with install/ otherpip commands doesn’t do that and can lead to issues, much like you are seeing. You should be also using %pip list (or %pip show magic variation since you were trying with show) to see what is installed in the kernel environment that your notebook is using.

See more about the modern %pip install command here. Then for more background, the second paragraph here goes into more details about why the exclamation point may lead to issues.

1 Like

Thanks for your response.

Problem was not “%“ or “!“
Issue was my Python version was 3.13 and one of the internal components called “audioloop“ of pydub has been depricated after Python 3.10

I need to create my conda env with Python 3.10 and continue.

Again, thank you for showing interest :slight_smile:

1 Like

What you posted indicated that when you tried to import pydub from within your Jupyter kernel you got a module not found error, despite your previous cell indicating it was installed wherever !pip show was running. That is the classic behavior you’ll see when using the outdated exclamation point in conjunction with pip or conda.
And so if there were other issues, your previous post was not really making it easy to dig into those. Plus, it is still is good advice to use the % symbol, not the exclamation point, along with conda or pip when going forward.

Also to answer your original post title question, it wasn’t very basic because your were using apparently a package with an outdated dependency with modern Python.

Glad to hear you figured it out. And really appreciate you posting the solution here to hopefully save others the journey.