Instalation validation failed, instalation failed

Description

Hello, I tried installing SCT but I can’t manage to finish the installation, it fails and I really don’t know how to fix this. Thank you for your help ! :slight_smile: (everything is the attachement.

It seems to be linked with matplotlib but I don’t understand the error…

Instalationerror.txt (49.1 KB)

Commands and terminal output


sct_check_dependencies


File upload

Hi @Gali! Thanks for sharing the install log so we can help you out.

Could not connect to display 127.0.0.1:0.0
Could not connect to any X display.

means it’s trying to connect to an X server. Ubuntu comes with one, but I see you’re on WSL (“5.4.72-microsoft-standard-WSL2”), which does not come with one by default.

The quick solution is to disable interactive plotting. spinalcordtoolbox works fine with non-interactive graphics, able to save results to .png files which you can then open from Windows Explorer. To do this, just do:

echo 'MPLBACKEND=Agg' >> ~/.bash_profile

and then log out and back in again. SCT is fully functional in this mode.

If you want to go further and enable interactive graphics, you can try following this answer: https://stackoverflow.com/questions/61110603/how-to-set-up-working-x11-forwarding-on-wsl2/61110604#61110604

We are still working through how to support WSL well, so please let us know how this goes for you and we can think about how to integrate its advice into our own. In the meantime, SCT should be working for you, and thanks for using SCT!

(refs: https://github.com/spinalcordtoolbox/spinalcordtoolbox/pull/3420/, https://github.com/spinalcordtoolbox/spinalcordtoolbox/issues/3392)

Of course, if SCT isn’t working for you after this, don’t hesitate to ask more questions. We’re all here to help each other out :slight_smile:

Hello nguenthe !

Thank you for your kind help and the explanations you gave me.
SCT has been succesfully installed, I don’t think I need to go further and enable interactive graphics for my project so I won’t try what you explained later.
I hope everything will work for me, I’ll come back to ask my many questions if things are not ok.

I’m very gratefull for the help you provided me !
Thanks again for your time.

1 Like