0
votes

When I use pycharm to run my code with from scipy import stats:

Importerror occurs: DLL load failed: The specified procedure could not be found.

Platform: Anaconda, python 3.7

IDE: pycharm, Microsoft VS code Anaconda is installed in D:\Anaconda

The scipy package is installed properly. The code can be run successfully in Jupyter.

I have tried the similar questions, but no one can help. Can anybody give me some help to fix it?

I have also reinstalled Anaconda, however, it still faied.

From scipy import stats:

Traceback (most recent call last): ...from scipy import stats File "D:\Anaconda3\lib\site-packages\scipy\stats__init__.py", line 345, in from .stats import * File "D:\Anaconda3\lib\site-packages\scipy\stats\stats.py", line 171, in from . import distributions File "D:\Anaconda3\lib\site-packages\scipy\stats\distributions.py", line 10, in from ._distn_infrastructure import (entropy, rv_discrete, rv_continuous, File "D:\Anaconda3\lib\site-packages\scipy\stats_distn_infrastructure.py", line 24, in from scipy import optimize File "D:\Anaconda3\lib\site-packages\scipy\optimize__init__.py", line 271, in from ._minimize import * File "D:\Anaconda3\lib\site-packages\scipy\optimize_minimize.py", line 21, in from scipy.sparse.linalg import LinearOperator File "D:\Anaconda3\lib\site-packages\scipy\sparse\linalg__init__.py", line 117, in from .eigen import * File "D:\Anaconda3\lib\site-packages\scipy\sparse\linalg\eigen__init__.py", line 11, in from .arpack import * File "D:\Anaconda3\lib\site-packages\scipy\sparse\linalg\eigen\arpack__init__.py", line 22, in from .arpack import * File "D:\Anaconda3\lib\site-packages\scipy\sparse\linalg\eigen\arpack\arpack.py", line 45, in from . import _arpack ImportError: DLL load failed: The specified procedure could not be found.

1

1 Answers

-1
votes

enter image description here

I solved it! I think there must be something wrong in Scipy packages in Conda, so I remove all the packages related to Ski-learn, and download from "https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy".

Choose numpy+whl Scipy ski-learn(corresponding edition) after downloading and install it by pip.