ModuleNotFoundError: No module named 'statsmodels'

Hi, I hope someone can help. My jupiter notebook was running just fine yesterday but today I get an error on import statsmodels.tsa.stattools as ts that the statsmodels module can not be found. i pip installed again and it says

Requirement already satisfied: statsmodels in ./.local/lib/python3.8/site-packages (0.12.1)

jupyter --paths gives me this:

config:
/home/legag/snap/jupyter/6/.jupyter
/snap/jupyter/6/etc/jupyter
/usr/local/etc/jupyter
/etc/jupyter
data:
/home/legag/snap/jupyter/6/.local/share/jupyter
/snap/jupyter/6/share/jupyter
/usr/local/share/jupyter
/usr/share/jupyter
runtime:
/run/user/1000/snap.jupyter/jupyter

Any pointers for a fix? I am not aware I changed anything and again yesterday teh code was running fine.

Thanks!

That is odd since you don’t think you changed anything. On the chance you aren’t using pip in same environment…
If you use conda at all, try running the following a new cell inside your notebook where you specifically want to import:

%conda install statsmodels

If you aren’t using conda at all, try running the following a new cell inside your notebook where you want to import:

%pip install statsmodels

Restart your kernel after either of those steps and try your import again.

I have used the same and its showing no errors but i’m getting no results

It doesn’t sound like your issue is the same as you posted under.

The error ModuleNotFoundError: No module named 'statsmodels' is what this thread is about. You say you don’t have that error.

You’d be better served making a new post and describe or share what you are seeing.