# Problems with linsolve

+1 vote

Hi! I ask you for help to deal with a problem with the linsolve command.

The expression I write is simplified: the presence of the input_form() is linked to the fact that linsolve is iterated within a for loop and therefore I have to adapt the arguments of the command linsolve to the presence of the cyclic variable, which for this example I have removed.

The following command works in the cadabra cloud version

import cdb.sympy.solvers as solv

I := 0 = a + b + 13;
II := 0 = b + 2*a - 34;
sols=solv.linsolve(Ex(str(I.input_form())+r','+str(II.input_form())),Ex(r'a'+r',b'));
sols[0][0];
sols[0][1];


but never works using the github one, giving the error:

AttributeError: module 'sympy' has no attribute 'linsolve'

At:
linsolve
packages/cdb/sympy/solvers.py(49):
(222):

Thanks,
Mattia

+1 vote

Your sympy does not have linsolve, better upgrade it to something more recent.

The commend sympy.__version__ gives 0.7 in my github Cadabra version.
I updated my sympy version with the shell command \$ pip install --upgrade sympy and the command pip show sympy gives now 1.5 (the sympy version on the cloud is 1.4). Unfortunately, when then I run sympy.__version__ again, i continue to have the o.7 version... how can I solve?
You probably have some system package with sympy installed as well; given your error message, it looks like you might get this solved with sudo apt uninstall python3-sympy.