DLL load failed while importing _cext

Hi everyone, I just started my Data Analysis training but I 've been stuck on importing matplotlib. Even with the repeated procedures given by ChatGPT and the JetBrains AI Support on my PyCharm IDE, I still experience an import error of the nature “ImportError: DLL load failed while importing _cext. The specified module could not be found” when I try importing “matplotlib.pyplot as plt” or “matplotlib as mpl”.

All the installed modules are of their latest respective versions and I’m working from the proper venv. How do I scale this hurdle pls? Thanks in anticipation of your suggestions.

It sounds like this problem:

python - ImportError: DLL load failed while importing _cext: The specified module could not be found - Stack Overflow

The solution is to install some Microsoft distributable DLLs which you can do via pip:

py -m pip install msvc-runtime 

Thanks, but I’m still getting the same DLL error. Would you suggest downgrading matplotlib version or python version or both?

Thanks for your input. I downloaded the Microsoft Visual C++ Redistributable for Visual Studio from the responses to the solution your shared and installed it and it works now.

I suggest starting with a fresh venv and installing the dependencies one at a time.

With packaging the right path is very context dependent. If you have been following the suggests of an LLM I assume it has been giving you very bad advise and driven your environment to an unrecoverable state.