简体   繁体   中英

How to fix "ImportError: DLL load failed while importing _arpack: The specified procedure could not be found."?

After installing a fresh copy of Anaconda 3 for my windows 10 and running my code, I am receiving this error message and I am not sure why "scipy" modules are not imported correctly. I need help to figure this out.

$ D:/Users/username/Anaconda3/python.exe d:/Users/username/Desktop/sol-tl/sol_357.py

Traceback (most recent call last):
  File "d:\Users\username\Desktop\some_name\my_script.py", line 37, in <module>
    from fluorescence.calculator import (electron_plotter, enter_computation_scheme, total_plotter)
  File "d:\Users\username\Desktop\sol-tl\fluorescence\calculator.py", line 18, in <module>
    from fluorescence.imports_module import (np, List, Tuple, Path, perf_counter, ode, odeint,
  File "d:\Users\username\Desktop\sol-tl\fluorescence\imports_module.py", line 25, in <module>
    from scipy.optimize import curve_fit
  File "D:\Users\username\Anaconda3\lib\site-packages\scipy\optimize\__init__.py", line 400, in <module>
    from .optimize import *
  File "D:\Users\username\Anaconda3\lib\site-packages\scipy\optimize\optimize.py", line 36, in <module>
    from ._numdiff import approx_derivative
  File "D:\Users\username\Anaconda3\lib\site-packages\scipy\optimize\_numdiff.py", line 6, in <module>
    from scipy.sparse.linalg import LinearOperator
  File "D:\Users\username\Anaconda3\lib\site-packages\scipy\sparse\linalg\__init__.py", line 114, in <module>
    from .eigen import *
  File "D:\Users\username\Anaconda3\lib\site-packages\scipy\sparse\linalg\eigen\__init__.py", line 9, in <module>
    from .arpack import *
  File "D:\Users\username\Anaconda3\lib\site-packages\scipy\sparse\linalg\eigen\arpack\__init__.py", line 20, in <module>
    from .arpack import *
  File "D:\Users\username\Anaconda3\lib\site-packages\scipy\sparse\linalg\eigen\arpack\arpack.py", line 42, in <module>
    from . import _arpack
ImportError: DLL load failed while importing _arpack: The specified procedure could not be found.

Thinking that the new release of Anaconda (3.9.12) is having issues with “Scipy” package, I removed the package from Conda and re-installed it using pip . Now, the code runs happily.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM