casadi / casadi

CasADi is a symbolic framework for numeric optimization implementing automatic differentiation in forward and reverse modes on sparse matrix-valued computational graphs. It supports self-contained C-code generation and interfaces state-of-the-art codes such as SUNDIALS, IPOPT etc. It can be used from C++, Python or Matlab/Octave.
http://casadi.org
GNU Lesser General Public License v3.0
1.58k stars 357 forks source link

libcasadi_interpolant_linear.dll not found #3696

Open L0tusC00kie opened 2 weeks ago

L0tusC00kie commented 2 weeks ago

Hi everyone, I keep receiving this error, although I checked the Lib\site-packages Folder and the mention dll is definitely there:

RuntimeError: .../casadi/core/casadi_os.cpp:166: Assertion "handle!=nullptr" failed: PluginInterface::load_plugin: Cannot load shared library 'libcasadi_interpolant_linear.dll': ( Searched directories: 1. casadipath from GlobalOptions

  1. CASADIPATH env var
  2. PATH env var (Windows)
  3. LD_LIBRARY_PATH env var (Linux)
  4. DYLD_LIBRARY_PATH env var (osx) A library may be 'not found' even if the file exists:
    • library is not compatible (different compiler/bitness)
    • the dependencies are not found ) Tried 'C:\Users\Schätzelein\Documents\Forschungspraxis\Model\myenv\Lib\site-packages\casadi' : Error code (WIN32): 126 Tried '' : Error code (WIN32): 126 Tried '.' : Error code (WIN32): 126

I have Python 3.11.9 64-bit and currently want to run a model with PyBamm. Does anyone encounter the same issue?

agriyakhetarpal commented 2 weeks ago

Hi, @L0tusC00kie – this was fixed in https://github.com/pybamm-team/PyBaMM/pull/4077 and will be available in the v24.5 pre-releases and subsequent stable release.