Display Fails in sct_check_dependencies -- sct5.0.1

Hello,

I am running SCT from my personal computer, Windows SO, with Ubuntu 20.04 LTS.
I tried to run sct_label_utils and this happens

sct_label_utils -i n4_CNS_001_0_T1w.nii -create-viewer 3 -o c3label.nii.gz   

qt.qpa.screen: QXcbConnection: Could not connect to display                                             Could not connect to any X display.   

sct_check_dependencies gives me

/mnt/Aran/SC_Segmentations$ sct_check_dependencies

--
Spinal Cord Toolbox (5.0.1)

sct_check_dependencies
--

SCT info:
- version: 5.0.1
- path: /home/aran/sct_5.0.1
OS: linux (Linux-4.4.0-19041-Microsoft-x86_64-with-debian-bullseye-sid)
CPU cores: Available: 8, Used by ITK functions: 8
RAM: Total: 16270MB, Used: 8285MB, Available: 7944MB
Check Python executable.............................[OK]
  Using bundled python 3.6.12 |Anaconda, Inc.| (default, Sep  8 2020, 23:10:56)
[GCC 7.3.0] at /home/aran/sct_5.0.1/python/envs/venv_sct/bin/python
Check if data are installed.........................[OK]
Check if colored is installed.......................[OK] (1.4.2)
Check if dipy is installed..........................[OK] (1.3.0)
Check if futures is installed.......................[OK]
Check if h5py is installed..........................[OK] (2.10.0)
Check if ivadomed (2.4.0) is installed..............[OK] (2.4.0)
Check if Keras (2.1.5) is installed.................[OK] (2.1.5)
Check if matplotlib is installed....................[OK] (3.3.3)
Check if nibabel is installed.......................[OK] (3.2.0)
Check if numpy is installed.........................[OK] (1.19.4)
Check if onnxruntime (1.4.0) is installed...........[OK] (1.4.0)
Check if pandas is installed........................[OK] (1.1.4)
Check if psutil is installed........................[OK] (5.7.3)
Check if pyqt5 (5.11.3) is installed................[OK] (5.11.3)
Check if pytest is installed........................[OK] (6.1.2)
Check if pytest-cov is installed....................[OK] (__version__ = '2.10.1')
Check if raven is installed.........................[OK]
Check if requests is installed......................[OK] (2.25.0)
Check if requirements-parser is installed...........[OK] (0.2.0)
Check if scipy is installed.........................[OK] (1.5.4)
Check if scikit-image is installed..................[OK] (0.17.2)
Check if scikit-learn is installed..................[OK] (0.23.2)
Check if tensorflow (1.5.0) is installed............[OK] (1.5.0)
Check if torch (1.5.0+cpu) is installed.............[OK] (1.5.0+cpu)
Check if torchvision (0.6.0+cpu) is installed.......[OK] (0.6.0+cpu)
Check if xlwt is installed..........................[OK] (1.3.0)
Check if tqdm is installed..........................[OK] (4.51.0)
Check if transforms3d is installed..................[OK] (0.3.1)
Check if urllib3 is installed.......................[OK] (1.26.2)
Check if pytest_console_scripts is installed........[OK]
Check if pytest-xdist is installed..................[OK] (2.1.0)
Check if spinalcordtoolbox is installed.............[OK]
Check ANTs compatibility with OS ...................[OK]
Check PropSeg compatibility with OS ................[OK]
Check if DISPLAY variable is set....................[FAIL]

I noticed the same problem in another thread and you were discussing it here also but I don’t know whether you found a solution!

Thanks

Aran

Hi Aran,

Did you follow exactly the instructions for SCT installation on Windows with WSL? It seems you didn’t because the variable DISPLAY is set in those instructions.

Can you please thoroughly follow those instructions, and if you experience an issue, please copy/paste the entire Terminal content so we can understand what went wrong and find a fix for it.

Best
Julien