Search code examples
pythonjupyter-notebookscipyimporterrorstatsmodels

ImportError: DLL load failed while importing _fblas


While I was importing statsmodels.api as sm it shows this error, how can I fix it? the same error appeared when I tried to import scipy.stats. And both of them worked well while doing the import statsmodel and import scipy ErrorDescription ErrorDescription

I tried to reinstall it but it didn't work. I also tried upgrade numpy and install mkl, but still not working.numpy+mkl So can you please help me fix it? Thank you!


Solution

  • First of all, I cannot open my jupyter notebook usingjupyter lab --notebook-dir=xxxxxxx\xxx\xx because of some bad config reason, so I just default my config using jupyter notebook --generate-config. And my jupyter back to life again.

    But next I encountered another problem, my matplotlib package cannot be imported because no module named pyparsing. After not working with uninstall and reinstall matpltlib on my jupyter notebook panel, I went to check Anaconda prompt, by using conda list matplotlib, I checked all my matplotlib packages, uninstalled them all. And then with conda install matplotlib, the problem was magically fixed.

    During the whole process, I don't remember when, but at some point I added my D:\anaconda3\envs\your-own-enviroment\lib\site-packages at which my package's location to system PATH.

    AND now, import statsmodels.api as sm worked well, too!!! hoorayyyyyyyy!!!