Closed Saransh-cpp closed 2 years ago
I think what is happening is that when you have pip installed pybamm, you have 2 versions of pybamm. The pip installed version living in your site-packages
, and the source directory living at C:\Users\Saransh\Saransh_softwares\OpenSource\Python\PyBaMM
. When your current working directory is C:\Users\Saransh\Saransh_softwares\OpenSource\Python\PyBaMM
, then when you run a test or script using pybamm, it imports the pybamm in your current directory, i.e. C:\Users\Saransh\Saransh_softwares\OpenSource\Python\PyBaMM\pybamm
, not the one in site-packages
. Is the KLU solver installed in C:\Users\Saransh\Saransh_softwares\OpenSource\Python\PyBaMM\pybamm
? If not then this might be the source of your problem.
Oh yes, this makes sense. I went through the installation again, and the python interpreter does import pybamm from the current working directory. Thanks! I can still make it work in WSL!
PyBaMM Version
develop
Python Version
3.9.0
Describe the bug
The
IDAKLUSolver
works inWindows
andWSL
but with a catch - I cannot use the solver if I run a script inPyBaMM
's root directory. I can use it everywhere else, even in the subdirectories within thePyBaMM
root directory. Due to this bug, I also cannot run the tests intended forIDAKLUSolver
as they throw an error saying -The error when using the solver from
PyBaMM
's directory -Now, there are 2 cases -
Windows
andWSL
.WSL
This works! I can use theIDAKLUSolver
from any directory, and I can also run the tests.Steps to Reproduce
The steps are exactly the same as in the case of using
pip
for installation inWSL
.Relevant log output
No response