pythonscipyimporterror

Incompatibility of python version 3.11.4 with scipy


I just learned python, my python version is 3.11.4 and scipy version 1.13.0 is installed, when the program is run it gives the error "cannot import name 'triu' from 'scipy.linalg'", how to fix this error do i

I could not do anything


Solution

  • basically triu is deprecated and was removed in 1.13, easiest solution is changing scipy version to before 1.13 to select the version you run :

    pip install scipy==1.12