Problem with latest version installation

--
Spinal Cord Toolbox (4.2.1)


Trying URL: https://osf.io/yutrj/?action=download
Downloading 20191031_sct_testing_data.zip...
Status: 100%|##############################| 6.78M/6.78M [00:00<00:00, 7.94MB/s]

Create temporary folder (/tmp/sct-20200128093537.207640-cqlzc2dy)...

Unzip data to: /tmp/sct-20200128093537.207640-cqlzc2dy

Check if folder already exists on the destination path...

Remove temporary folders...
Done!

Will run through the following tests:
- sequentially: sct_deepseg_gm sct_deepseg_lesion sct_deepseg_sc
- in parallel with 8 jobs: sct_analyze_lesion sct_analyze_texture sct_apply_transfo sct_convert sct_compute_ernst_angle sct_compute_hausdorff_distance sct_compute_mtr sct_compute_mscc sct_compute_snr sct_concat_transfo sct_create_mask sct_crop_image sct_dice_coefficient sct_detect_pmj sct_dmri_compute_dti sct_dmri_concat_b0_and_dwi sct_dmri_concat_bvals sct_dmri_concat_bvecs sct_dmri_create_noisemask sct_dmri_compute_bvalue sct_dmri_moco sct_dmri_separate_b0_and_dwi sct_dmri_transpose_bvecs sct_extract_metric sct_flatten_sagittal sct_fmri_compute_tsnr sct_fmri_moco sct_get_centerline sct_image sct_label_utils sct_label_vertebrae sct_maths sct_merge_images sct_process_segmentation sct_propseg sct_qc sct_register_multimodal sct_register_to_template sct_resample sct_smooth_spinalcord sct_straighten_spinalcord sct_warp_template
Checking sct_deepseg_gm.............................[OK]
Checking sct_deepseg_lesion.........................[OK]
Checking sct_deepseg_sc.............................[OK]
Checking sct_analyze_lesion.........................[OK]
Checking sct_analyze_texture........................[OK]
Checking sct_apply_transfo..........................[OK]
Checking sct_convert................................[OK]
Checking sct_compute_ernst_angle....................[OK]
Checking sct_compute_hausdorff_distance.............[OK]
Checking sct_compute_mtr............................[OK]
Checking sct_compute_mscc...........................[OK]
Checking sct_compute_snr............................[OK]
Checking sct_concat_transfo.........................[OK]
Checking sct_create_mask............................[OK]
Checking sct_crop_image.............................[OK]
Checking sct_dice_coefficient.......................[OK]
Checking sct_detect_pmj.............................[OK]
Checking sct_dmri_compute_dti.......................[OK]
Checking sct_dmri_concat_b0_and_dwi.................[OK]
Checking sct_dmri_concat_bvals......................[OK]
Checking sct_dmri_concat_bvecs......................[OK]
Checking sct_dmri_create_noisemask..................[OK]
Checking sct_dmri_compute_bvalue....................[OK]
Checking sct_dmri_moco..............................[OK]
Checking sct_dmri_separate_b0_and_dwi...............[OK]
Checking sct_dmri_transpose_bvecs...................[OK]
Checking sct_extract_metric.........................[OK]
Checking sct_flatten_sagittal.......................[OK]
Checking sct_fmri_compute_tsnr......................[OK]
Checking sct_fmri_moco..............................[OK]
Checking sct_get_centerline.........................[OK]
Checking sct_image..................................[OK]
Checking sct_label_utils............................[OK]
Checking sct_label_vertebrae........................[OK]
Checking sct_maths..................................[OK]
Checking sct_merge_images...........................[OK]
Checking sct_process_segmentation...................[OK]
Checking sct_propseg................................[OK]
Checking sct_qc.....................................[OK]
Checking sct_register_multimodal....................[OK]
Checking sct_register_to_template...................[OK]
Checking sct_resample...............................[OK]
Checking sct_smooth_spinalcord......................[OK]
Checking sct_straighten_spinalcord..................[OK]
Checking sct_warp_template..........................[OK]
status: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Finished! Elapsed time: 111s

Testing gives this outcome . However, when I run sct_deepseg_sc it still gives the same error on scikit_image installation:
sct_deepseg_sc -i kurtosis_dwi_mean.nii -centerline viewer -c t2 
--
Spinal Cord Toolbox (4.2.1)

Config deepseg_sc:
  Centerline algorithm: viewer
  Brain in image: True
  Kernel dimension: 2d
  Contrast: t2
  Threshold: 0.7

Create temporary folder (/tmp/sct-20200128093959.970252-jv6e_uzv)...
Reorient the image to RPI, if necessary...
Finding the spinal cord centerline...
Traceback (most recent call last):
  File "/home/rosella/sct_4.2.1/scripts/sct_deepseg_sc.py", line 205, in <module>
    main()
  File "/home/rosella/sct_4.2.1/scripts/sct_deepseg_sc.py", line 189, in main
    threshold_seg=threshold, remove_temp_files=remove_temp_files, verbose=verbose)
  File "/home/rosella/sct_4.2.1/spinalcordtoolbox/deepseg_sc/core.py", line 477, in deep_segmentation_spinalcord
    centerline_fname=file_ctr)
  File "/home/rosella/sct_4.2.1/spinalcordtoolbox/deepseg_sc/core.py", line 106, in find_centerline
    im_labels = _call_viewer_centerline(im)
  File "/home/rosella/sct_4.2.1/spinalcordtoolbox/centerline/core.py", line 268, in _call_viewer_centerline
    from spinalcordtoolbox.gui.base import AnatomicalParams
  File "/home/rosella/sct_4.2.1/spinalcordtoolbox/gui/base.py", line 27, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets
ImportError: dlopen: cannot load any more object with static TLS

OK, this error has been encountered in the past, see here. If you are running SCT via a virtual machine, could you please try to do the following modifications on your VM:

  • Increased the graphics card to 128MB video memory
  • graphics controller: VBoxVGA
  • Acceleration: 3D

Best,
Julien

I am running SCT on my PC without using a virtual machine ,
thanks
Rosella

Are you using Docker?

No. I am installing on my Linux machine

I see you’ve already had that issue in the past here.

Based on a few forums, e.g. here, it is possible that your Debian distribution is too old to support the latest libraries. Would you be able to upgrade your OS?

I had a problem with the viewer with SCT 4.1 but running SCT 4.2.1 the viewer strangely works!
The error is about pyqt5 and scikit and all commands using these libraries.

The error is about pyqt5 and scikit and all commands using these libraries.

Yes, currently there is indeed a problem with these libraries. The error is the following:

dlopen: cannot load any more object with static TLS

According to my investigations, these errors are related to the version of your OS and/or possible limitations with hardware (e.g., graphic card) as suggested by this post.

So, as a first step, could you try to update your libraries in your OS (e.g. apt-get update) and try again the installation. If it doesn’t work, would you be able to upgrade your OS to a more recent version?

1 Like

Hi,
Is this issue solved on your end?
Best,
Julien

Hi. I manage to use SCT for some utils which do not include pyqt5 and scikit packages. As regards updating my OS I do not know if I am allowed to do it.
I am currently using the previous SCT version, which worked.
Thanks,
Rosella

Which version is that?

It is version 4.0.0
best,
Rosella

Hi Rosella,
We’ve managed to reproduce your error on the same Linux distribution with v4.2.1. What is strange however, is that we also observe an error with v4.0.0. More details here.
To help us debug this error, could you please share with us the Terminal output of the v4.0.0 installation in your system?
Best,
Julien

Hi Julien
Sorry for the late reply… But I have been through some issues with my computer after some updates. It was not working at all. Tomorrow I will be able to use SCT again and answer your question.
Thanks
Rosella

Hi. that is the output of SCT 4.1.0

rosella@vivi:~/tooboxes/spinalcordtoolbox-4.1.0$ ./install_sct


*******************************
* Welcome to SCT installation *
*******************************



Checking requirements...


SCT version ......... 4.1.0
Installation type ... package
Operating system .... linux
Shell config ........ /home/rosella/.bashrc

To improve user experience and fix bugs, the SCT development team is using a
report system to automatically receive crash reports and errors from users.
These reports are anonymous.

Do you agree to help us improve SCT? [y]es/[n]o: y

--> Crash reports will be sent to the SCT development team. Thank you!


SCT will be installed here: [/home/rosella/sct_4.1.0]

Do you agree? [y]es/[n]o: y

Copying source files from /home/rosella/tooboxes/spinalcordtoolbox-4.1.0 to /home/rosella/sct_4.1.0

.......................................................................................................................................................................................................................................................................................................................................................................................................
Installing conda...


rm -rf /home/rosella/sct_4.1.0/python


mkdir -p /home/rosella/sct_4.1.0/python


wget -O /tmp/tmp.Dogz2joH6v/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh

--2020-02-26 15:09:22--  https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
Resolving repo.continuum.io (repo.continuum.io)... 104.18.200.79, 104.18.201.79, 2606:4700::6812:c84f, ...
Connecting to repo.continuum.io (repo.continuum.io)|104.18.200.79|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71785000 (68M) [application/x-sh]
Saving to: ‘/tmp/tmp.Dogz2joH6v/miniconda.sh’

/tmp/tmp.Dogz2joH6v/miniconda.s 100%[=========================================================>]  68.46M  60.8MB/s   in 1.1s

2020-02-26 15:09:23 (60.8 MB/s) - ‘/tmp/tmp.Dogz2joH6v/miniconda.sh’ saved [71785000/71785000]

exit status is 0

bash /tmp/tmp.Dogz2joH6v/miniconda.sh -p /home/rosella/sct_4.1.0/python -b -f

PREFIX=/home/rosella/sct_4.1.0/python
Unpacking payload ...
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/rosella/sct_4.1.0/python

  added / updated specs:
    - _libgcc_mutex==0.1=main
    - asn1crypto==1.2.0=py37_0
    - ca-certificates==2019.10.16=0
    - certifi==2019.9.11=py37_0
    - cffi==1.13.0=py37h2e261b9_0
    - chardet==3.0.4=py37_1003
    - conda-package-handling==1.6.0=py37h7b6447c_0
    - conda==4.7.12=py37_0
    - cryptography==2.8=py37h1ba5d50_0
    - idna==2.8=py37_0
    - libedit==3.1.20181209=hc058e9b_0
    - libffi==3.2.1=hd88cf55_4
    - libgcc-ng==9.1.0=hdf63c60_0
    - libstdcxx-ng==9.1.0=hdf63c60_0
    - ncurses==6.1=he6710b0_1
    - openssl==1.1.1d=h7b6447c_3
    - pip==19.3.1=py37_0
    - pycosat==0.6.3=py37h14c3975_0
    - pycparser==2.19=py37_0
    - pyopenssl==19.0.0=py37_0
    - pysocks==1.7.1=py37_0
    - python==3.7.4=h265db76_1
    - readline==7.0=h7b6447c_5
    - requests==2.22.0=py37_0
    - ruamel_yaml==0.15.46=py37h14c3975_0
    - setuptools==41.4.0=py37_0
    - six==1.12.0=py37_0
    - sqlite==3.30.0=h7b6447c_0
    - tk==8.6.8=hbc83047_0
    - tqdm==4.36.1=py_0
    - urllib3==1.24.2=py37_0
    - wheel==0.33.6=py37_0
    - xz==5.2.4=h14c3975_4
    - yaml==0.1.7=had09818_2
    - zlib==1.2.11=h7b6447c_3


The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  asn1crypto         pkgs/main/linux-64::asn1crypto-1.2.0-py37_0
  ca-certificates    pkgs/main/linux-64::ca-certificates-2019.10.16-0
  certifi            pkgs/main/linux-64::certifi-2019.9.11-py37_0
  cffi               pkgs/main/linux-64::cffi-1.13.0-py37h2e261b9_0
  chardet            pkgs/main/linux-64::chardet-3.0.4-py37_1003
  conda              pkgs/main/linux-64::conda-4.7.12-py37_0
  conda-package-han~ pkgs/main/linux-64::conda-package-handling-1.6.0-py37h7b6447c_0
  cryptography       pkgs/main/linux-64::cryptography-2.8-py37h1ba5d50_0
  idna               pkgs/main/linux-64::idna-2.8-py37_0
  libedit            pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0
  libffi             pkgs/main/linux-64::libffi-3.2.1-hd88cf55_4
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  ncurses            pkgs/main/linux-64::ncurses-6.1-he6710b0_1
  openssl            pkgs/main/linux-64::openssl-1.1.1d-h7b6447c_3
  pip                pkgs/main/linux-64::pip-19.3.1-py37_0
  pycosat            pkgs/main/linux-64::pycosat-0.6.3-py37h14c3975_0
  pycparser          pkgs/main/linux-64::pycparser-2.19-py37_0
  pyopenssl          pkgs/main/linux-64::pyopenssl-19.0.0-py37_0
  pysocks            pkgs/main/linux-64::pysocks-1.7.1-py37_0
  python             pkgs/main/linux-64::python-3.7.4-h265db76_1
  readline           pkgs/main/linux-64::readline-7.0-h7b6447c_5
  requests           pkgs/main/linux-64::requests-2.22.0-py37_0
  ruamel_yaml        pkgs/main/linux-64::ruamel_yaml-0.15.46-py37h14c3975_0
  setuptools         pkgs/main/linux-64::setuptools-41.4.0-py37_0
  six                pkgs/main/linux-64::six-1.12.0-py37_0
  sqlite             pkgs/main/linux-64::sqlite-3.30.0-h7b6447c_0
  tk                 pkgs/main/linux-64::tk-8.6.8-hbc83047_0
  tqdm               pkgs/main/noarch::tqdm-4.36.1-py_0
  urllib3            pkgs/main/linux-64::urllib3-1.24.2-py37_0
  wheel              pkgs/main/linux-64::wheel-0.33.6-py37_0
  xz                 pkgs/main/linux-64::xz-5.2.4-h14c3975_4
  yaml               pkgs/main/linux-64::yaml-0.1.7-had09818_2
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3


Preparing transaction: done
Executing transaction: done
installation finished.
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.7.12
  latest version: 4.8.2

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: /home/rosella/sct_4.1.0/python/envs/venv_sct

  added / updated specs:
    - python=3.6


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2020.1.1   |                0         125 KB
    certifi-2019.11.28         |           py36_0         153 KB
    ld_impl_linux-64-2.33.1    |       h53a641e_7         568 KB
    ncurses-6.2                |       he6710b0_0         1.1 MB
    openssl-1.1.1d             |       h7b6447c_4         2.5 MB
    pip-20.0.2                 |           py36_1         1.7 MB
    python-3.6.10              |       h0371630_0        29.7 MB
    setuptools-45.2.0          |           py36_0         520 KB
    sqlite-3.31.1              |       h7b6447c_0         1.1 MB
    wheel-0.34.2               |           py36_0          51 KB
    ------------------------------------------------------------
                                           Total:        37.5 MB

The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  ca-certificates    pkgs/main/linux-64::ca-certificates-2020.1.1-0
  certifi            pkgs/main/linux-64::certifi-2019.11.28-py36_0
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7
  libedit            pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0
  libffi             pkgs/main/linux-64::libffi-3.2.1-hd88cf55_4
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  ncurses            pkgs/main/linux-64::ncurses-6.2-he6710b0_0
  openssl            pkgs/main/linux-64::openssl-1.1.1d-h7b6447c_4
  pip                pkgs/main/linux-64::pip-20.0.2-py36_1
  python             pkgs/main/linux-64::python-3.6.10-h0371630_0
  readline           pkgs/main/linux-64::readline-7.0-h7b6447c_5
  setuptools         pkgs/main/linux-64::setuptools-45.2.0-py36_0
  sqlite             pkgs/main/linux-64::sqlite-3.31.1-h7b6447c_0
  tk                 pkgs/main/linux-64::tk-8.6.8-hbc83047_0
  wheel              pkgs/main/linux-64::wheel-0.34.2-py36_0
  xz                 pkgs/main/linux-64::xz-5.2.4-h14c3975_4
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3


Proceed ([y]/n)?

Downloading and Extracting Packages
python-3.6.10        | 29.7 MB   | ##################################################################################### | 100%
sqlite-3.31.1        | 1.1 MB    | ##################################################################################### | 100%
openssl-1.1.1d       | 2.5 MB    | ##################################################################################### | 100%
ncurses-6.2          | 1.1 MB    | ##################################################################################### | 100%
pip-20.0.2           | 1.7 MB    | ##################################################################################### | 100%
ld_impl_linux-64-2.3 | 568 KB    | ##################################################################################### | 100%
wheel-0.34.2         | 51 KB     | ##################################################################################### | 100%
ca-certificates-2020 | 125 KB    | ##################################################################################### | 100%
setuptools-45.2.0    | 520 KB    | ##################################################################################### | 100%
certifi-2019.11.28   | 153 KB    | ##################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate venv_sct
#
# To deactivate an active environment, use
#
#     $ conda deactivate


Installing Python dependencies...

Collecting numpy
  Using cached numpy-1.18.1-cp36-cp36m-manylinux1_x86_64.whl (20.1 MB)
Installing collected packages: numpy
Successfully installed numpy-1.18.1
Ignoring tensorflow: markers 'platform_system == "Darwin" and "15." in platform_release' don't match your environment
Requirement already satisfied: numpy in ./python/envs/venv_sct/lib/python3.6/site-packages (from -r requirements.txt (line 1)) (1.18.1)
Collecting cryptography
  Using cached cryptography-2.8-cp34-abi3-manylinux2010_x86_64.whl (2.3 MB)
Collecting dipy
  Downloading dipy-1.1.1-cp36-cp36m-manylinux1_x86_64.whl (8.1 MB)
     |████████████████████████████████| 8.1 MB 4.1 MB/s
Collecting futures
  Using cached futures-3.1.1-py3-none-any.whl (2.8 kB)
Collecting h5py
  Using cached h5py-2.10.0-cp36-cp36m-manylinux1_x86_64.whl (2.9 MB)
Collecting Keras
  Using cached Keras-2.3.1-py2.py3-none-any.whl (377 kB)
Collecting matplotlib
  Downloading matplotlib-3.1.3-cp36-cp36m-manylinux1_x86_64.whl (13.1 MB)
     |████████████████████████████████| 13.1 MB 54.3 MB/s
Collecting nibabel
  Downloading nibabel-3.0.1-py3-none-any.whl (3.3 MB)
     |████████████████████████████████| 3.3 MB 35.5 MB/s
Collecting pandas
  Downloading pandas-1.0.1-cp36-cp36m-manylinux1_x86_64.whl (10.1 MB)
     |████████████████████████████████| 10.1 MB 72.6 MB/s
Collecting psutil
  Downloading psutil-5.7.0.tar.gz (449 kB)
     |████████████████████████████████| 449 kB 69.7 MB/s
Collecting pyqt5
  Downloading PyQt5-5.14.1-5.14.1-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl (63.5 MB)
     |████████████████████████████████| 63.5 MB 53 kB/s
Collecting pytest
  Downloading pytest-5.3.5-py3-none-any.whl (235 kB)
     |████████████████████████████████| 235 kB 32.5 MB/s
Collecting pytest-cov
  Using cached pytest_cov-2.8.1-py2.py3-none-any.whl (18 kB)
Collecting raven
  Using cached raven-6.10.0-py2.py3-none-any.whl (284 kB)
Collecting requests
  Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 592 kB/s
Collecting scipy
  Downloading scipy-1.4.1-cp36-cp36m-manylinux1_x86_64.whl (26.1 MB)
     |████████████████████████████████| 26.1 MB 64 kB/s
Collecting scikit-image
  Using cached scikit_image-0.16.2-cp36-cp36m-manylinux1_x86_64.whl (26.5 MB)
Collecting scikit-learn
  Downloading scikit_learn-0.22.1-cp36-cp36m-manylinux1_x86_64.whl (7.0 MB)
     |████████████████████████████████| 7.0 MB 24.6 MB/s
Collecting tensorflow
  Downloading tensorflow-2.1.0-cp36-cp36m-manylinux2010_x86_64.whl (421.8 MB)
     |████████████████████████████████| 421.8 MB 13 kB/s
Collecting xlrd
  Using cached xlrd-1.2.0-py2.py3-none-any.whl (103 kB)
Collecting xlutils
  Using cached xlutils-2.0.0-py2.py3-none-any.whl (55 kB)
Collecting xlwt
  Using cached xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
Collecting tqdm
  Downloading tqdm-4.43.0-py2.py3-none-any.whl (59 kB)
     |████████████████████████████████| 59 kB 1.5 MB/s
Processing /home/rosella/.cache/pip/wheels/3d/3c/84/28d36677f3c760c048bd02b5a547ea0c4027770cc9cdb9af1e/transforms3d-0.3.1-cp36-none-any.whl
Collecting urllib3[secure]
  Downloading urllib3-1.25.8-py2.py3-none-any.whl (125 kB)
     |████████████████████████████████| 125 kB 37.3 MB/s
Collecting six>=1.4.1
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting cffi!=1.11.3,>=1.8
  Downloading cffi-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (399 kB)
     |████████████████████████████████| 399 kB 25.1 MB/s
Collecting keras-preprocessing>=1.0.5
  Using cached Keras_Preprocessing-1.1.0-py2.py3-none-any.whl (41 kB)
Collecting pyyaml
  Downloading PyYAML-5.3.tar.gz (268 kB)
     |████████████████████████████████| 268 kB 33.5 MB/s
Collecting keras-applications>=1.0.6
  Using cached Keras_Applications-1.0.8-py3-none-any.whl (50 kB)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.1.0-cp36-cp36m-manylinux1_x86_64.whl (90 kB)
Collecting cycler>=0.10
  Using cached cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting python-dateutil>=2.1
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1
  Downloading pyparsing-2.4.6-py2.py3-none-any.whl (67 kB)
     |████████████████████████████████| 67 kB 227 kB/s
Collecting pytz>=2017.2
  Using cached pytz-2019.3-py2.py3-none-any.whl (509 kB)
Collecting PyQt5-sip<13,>=12.7
  Downloading PyQt5_sip-12.7.1-cp36-cp36m-manylinux1_x86_64.whl (252 kB)
     |████████████████████████████████| 252 kB 31.0 MB/s
Collecting importlib-metadata>=0.12; python_version < "3.8"
  Downloading importlib_metadata-1.5.0-py2.py3-none-any.whl (30 kB)
Collecting attrs>=17.4.0
  Using cached attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting py>=1.5.0
  Downloading py-1.8.1-py2.py3-none-any.whl (83 kB)
     |████████████████████████████████| 83 kB 560 kB/s
Collecting wcwidth
  Downloading wcwidth-0.1.8-py2.py3-none-any.whl (17 kB)
Collecting packaging
  Downloading packaging-20.1-py2.py3-none-any.whl (36 kB)
Collecting pluggy<1.0,>=0.12
  Using cached pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
Collecting more-itertools>=4.0.0
  Downloading more_itertools-8.2.0-py3-none-any.whl (43 kB)
     |████████████████████████████████| 43 kB 302 kB/s
Collecting coverage>=4.4
  Downloading coverage-5.0.3-cp36-cp36m-manylinux1_x86_64.whl (227 kB)
     |████████████████████████████████| 227 kB 34.9 MB/s
Collecting idna<3,>=2.5
  Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 1.2 MB/s
Requirement already satisfied: certifi>=2017.4.17 in ./python/envs/venv_sct/lib/python3.6/site-packages (from requests->-r requirements.txt (line 15)) (2019.11.28)
Collecting chardet<4,>=3.0.2
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting networkx>=2.0
  Using cached networkx-2.4-py3-none-any.whl (1.6 MB)
Collecting pillow>=4.3.0
  Downloading Pillow-7.0.0-cp36-cp36m-manylinux1_x86_64.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 21.3 MB/s
Collecting imageio>=2.3.0
  Downloading imageio-2.8.0-py3-none-any.whl (3.3 MB)
     |████████████████████████████████| 3.3 MB 34.0 MB/s
Collecting PyWavelets>=0.4.0
  Using cached PyWavelets-1.1.1-cp36-cp36m-manylinux1_x86_64.whl (4.4 MB)
Collecting joblib>=0.11
  Using cached joblib-0.14.1-py2.py3-none-any.whl (294 kB)
Processing /home/rosella/.cache/pip/wheels/7c/06/54/bc84598ba1daf8f970247f550b175aaaee85f68b4b0c5ab2c6/termcolor-1.1.0-cp36-none-any.whl
Processing /home/rosella/.cache/pip/wheels/5c/2e/7e/a1d4d4fcebe6c381f378ce7743a3ced3699feb89bcfbdadadd/gast-0.2.2-cp36-none-any.whl
Collecting astor>=0.6.0
  Using cached astor-0.8.1-py2.py3-none-any.whl (27 kB)
Collecting google-pasta>=0.1.6
  Using cached google_pasta-0.1.8-py3-none-any.whl (57 kB)
Collecting protobuf>=3.8.0
  Downloading protobuf-3.11.3-cp36-cp36m-manylinux1_x86_64.whl (1.3 MB)
     |████████████████████████████████| 1.3 MB 57.8 MB/s
Collecting tensorflow-estimator<2.2.0,>=2.1.0rc0
  Downloading tensorflow_estimator-2.1.0-py2.py3-none-any.whl (448 kB)
     |████████████████████████████████| 448 kB 21.5 MB/s
Processing /home/rosella/.cache/pip/wheels/8e/28/49/fad4e7f0b9a1227708cbbee4487ac8558a7334849cb81c813d/absl_py-0.9.0-cp36-none-any.whl
Collecting tensorboard<2.2.0,>=2.1.0
  Downloading tensorboard-2.1.0-py3-none-any.whl (3.8 MB)
     |████████████████████████████████| 3.8 MB 26.5 MB/s
Requirement already satisfied: wheel>=0.26; python_version >= "3" in ./python/envs/venv_sct/lib/python3.6/site-packages (from tensorflow->-r requirements.txt (line 19)) (0.34.2)
Processing /home/rosella/.cache/pip/wheels/2c/b1/94/43d03e130b929aae7ba3f8d15cbd7bc0d1cb5bb38a5c721833/opt_einsum-3.1.0-cp36-none-any.whl
Collecting wrapt>=1.11.1
  Downloading wrapt-1.12.0.tar.gz (27 kB)
Collecting grpcio>=1.8.6
  Downloading grpcio-1.27.2-cp36-cp36m-manylinux2010_x86_64.whl (2.7 MB)
     |████████████████████████████████| 2.7 MB 20.7 MB/s
Collecting pyOpenSSL>=0.14; extra == "secure"
  Using cached pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB)
Processing /home/rosella/.cache/pip/wheels/f2/9a/90/de94f8556265ddc9d9c8b271b0f63e57b26fb1d67a45564511/pycparser-2.19-py2.py3-none-any.whl
Requirement already satisfied: setuptools in ./python/envs/venv_sct/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib->-r requirements.txt (line 7)) (45.2.0.post20200210)
Collecting zipp>=0.5
  Downloading zipp-3.0.0-py3-none-any.whl (4.8 kB)
Collecting decorator>=4.3.0
  Using cached decorator-4.4.1-py2.py3-none-any.whl (9.2 kB)
Collecting markdown>=2.6.8
  Downloading Markdown-3.2.1-py2.py3-none-any.whl (88 kB)
     |████████████████████████████████| 88 kB 1.7 MB/s
Collecting google-auth<2,>=1.6.3
  Downloading google_auth-1.11.2-py2.py3-none-any.whl (76 kB)
     |████████████████████████████████| 76 kB 1.1 MB/s
Collecting werkzeug>=0.11.15
  Downloading Werkzeug-1.0.0-py2.py3-none-any.whl (298 kB)
     |████████████████████████████████| 298 kB 36.4 MB/s
Collecting google-auth-oauthlib<0.5,>=0.4.1
  Using cached google_auth_oauthlib-0.4.1-py2.py3-none-any.whl (18 kB)
Collecting rsa<4.1,>=3.1.4
  Using cached rsa-4.0-py2.py3-none-any.whl (38 kB)
Collecting pyasn1-modules>=0.2.1
  Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
     |████████████████████████████████| 155 kB 56.5 MB/s
Collecting cachetools<5.0,>=2.0.0
  Using cached cachetools-4.0.0-py3-none-any.whl (10 kB)
Collecting requests-oauthlib>=0.7.0
  Using cached requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
Collecting pyasn1>=0.1.3
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting oauthlib>=3.0.0
  Using cached oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
Building wheels for collected packages: psutil, pyyaml, wrapt
  Building wheel for psutil (setup.py) ... done
  Created wheel for psutil: filename=psutil-5.7.0-cp36-cp36m-linux_x86_64.whl size=278731 sha256=de9602841b372b99a0574aa59dcc8dc9b34689e46c1528df8e1a63350bbd4fb7
  Stored in directory: /home/rosella/.cache/pip/wheels/a1/d9/f2/b5620c01e9b3e858c6877b1045fda5b115cf7df6490f883382
  Building wheel for pyyaml (setup.py) ... done
  Created wheel for pyyaml: filename=PyYAML-5.3-cp36-cp36m-linux_x86_64.whl size=44229 sha256=21bcb3dccddc3ceececa383934828c243e7337485013bfd1e17ea0e18458abfa
  Stored in directory: /home/rosella/.cache/pip/wheels/b1/86/0d/10e6c39d3a2b85ba807d7657ee80f08cc16c03f2aa2adf8e46
  Building wheel for wrapt (setup.py) ... done
  Created wheel for wrapt: filename=wrapt-1.12.0-cp36-cp36m-linux_x86_64.whl size=75665 sha256=e464388c9970feba67214d359cc4051482be3a054378e88562117b5e9e375641
  Stored in directory: /home/rosella/.cache/pip/wheels/d6/61/05/e03fa5094273d241c17ab2a0b774027a6e167870275e93bf25
Successfully built psutil pyyaml wrapt
Installing collected packages: six, pycparser, cffi, cryptography, h5py, nibabel, scipy, dipy, futures, keras-preprocessing, pyyaml, keras-applications, Keras, kiwisolver, cycler, python-dateutil, pyparsing, matplotlib, pytz, pandas, psutil, PyQt5-sip, pyqt5, zipp, importlib-metadata, attrs, py, wcwidth, packaging, pluggy, more-itertools, pytest, coverage, pytest-cov, raven, idna, pyOpenSSL, urllib3, chardet, requests, decorator, networkx, pillow, imageio, PyWavelets, scikit-image, joblib, scikit-learn, termcolor, gast, astor, google-pasta, protobuf, tensorflow-estimator, absl-py, grpcio, markdown, pyasn1, rsa, pyasn1-modules, cachetools, google-auth, werkzeug, oauthlib, requests-oauthlib, google-auth-oauthlib, tensorboard, opt-einsum, wrapt, tensorflow, xlrd, xlwt, xlutils, tqdm, transforms3d
Successfully installed Keras-2.3.1 PyQt5-sip-12.7.1 PyWavelets-1.1.1 absl-py-0.9.0 astor-0.8.1 attrs-19.3.0 cachetools-4.0.0 cffi-1.14.0 chardet-3.0.4 coverage-5.0.3 cryptography-2.8 cycler-0.10.0 decorator-4.4.1 dipy-1.1.1 futures-3.1.1 gast-0.2.2 google-auth-1.11.2 google-auth-oauthlib-0.4.1 google-pasta-0.1.8 grpcio-1.27.2 h5py-2.10.0 idna-2.9 imageio-2.8.0 importlib-metadata-1.5.0 joblib-0.14.1 keras-applications-1.0.8 keras-preprocessing-1.1.0 kiwisolver-1.1.0 markdown-3.2.1 matplotlib-3.1.3 more-itertools-8.2.0 networkx-2.4 nibabel-3.0.1 oauthlib-3.1.0 opt-einsum-3.1.0 packaging-20.1 pandas-1.0.1 pillow-7.0.0 pluggy-0.13.1 protobuf-3.11.3 psutil-5.7.0 py-1.8.1 pyOpenSSL-19.1.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.19 pyparsing-2.4.6 pyqt5-5.14.1 pytest-5.3.5 pytest-cov-2.8.1 python-dateutil-2.8.1 pytz-2019.3 pyyaml-5.3 raven-6.10.0 requests-2.23.0 requests-oauthlib-1.3.0 rsa-4.0 scikit-image-0.16.2 scikit-learn-0.22.1 scipy-1.4.1 six-1.14.0 tensorboard-2.1.0 tensorflow-2.1.0 tensorflow-estimator-2.1.0 termcolor-1.1.0 tqdm-4.43.0 transforms3d-0.3.1 urllib3-1.25.8 wcwidth-0.1.8 werkzeug-1.0.0 wrapt-1.12.0 xlrd-1.2.0 xlutils-2.0.0 xlwt-1.3.0 zipp-3.0.0
Obtaining file:///home/rosella/sct_4.1.0
Installing collected packages: spinalcordtoolbox
  Running setup.py develop for spinalcordtoolbox
Successfully installed spinalcordtoolbox

Creating launchers for Python scripts...


Make shell scripts executable...


Creating symbolic links for Shell scripts...


Installing binaries...


sct_download_data -d binaries_debian -o /home/rosella/sct_4.1.0/bin


--
Spinal Cord Toolbox (4.1.0)

Folder /home/rosella/sct_4.1.0/bin has been created.

Trying URL: https://osf.io/bt58d/?action=download
Downloading 20190930_sct_binaries_linux.tar.gz...
Status: 100%|##############################################################################| 81.1M/81.1M [00:06<00:00, 11.6MB/s]

Create temporary folder (/tmp/sct-20200226151123.255541-w8g0v5da)...

Unzip data to: /tmp/sct-20200226151123.255541-w8g0v5da

Check if folder already exists on the destination path...

Remove temporary folders...
Done!


All requirements installed!


. /home/rosella/sct_4.1.0/python/bin/activate /home/rosella/sct_4.1.0/python


Installing data...


rm -rf /home/rosella/sct_4.1.0/data


mkdir -p /home/rosella/sct_4.1.0/data


cd /home/rosella/sct_4.1.0/data


sct_download_data -d PAM50


--
Spinal Cord Toolbox (4.1.0)


Trying URL: https://osf.io/kc3jx/?action=download
Downloading 20181214_PAM50.zip...
Status: 100%|##############################################################################| 70.8M/70.8M [00:04<00:00, 17.5MB/s]

Create temporary folder (/tmp/sct-20200226151131.694202-slgw4390)...

Unzip data to: /tmp/sct-20200226151131.694202-slgw4390

Check if folder already exists on the destination path...

Remove temporary folders...
Done!


sct_download_data -d gm_model


--
Spinal Cord Toolbox (4.1.0)


Trying URL: https://osf.io/ugscu/?action=download
Downloading 20160922_gm_model.zip...
Status: 100%|##############################################################################| 10.3M/10.3M [00:00<00:00, 14.5MB/s]

Create temporary folder (/tmp/sct-20200226151134.651134-8_w90zbr)...

Unzip data to: /tmp/sct-20200226151134.651134-8_w90zbr

Check if folder already exists on the destination path...

Remove temporary folders...
Done!


sct_download_data -d optic_models


--
Spinal Cord Toolbox (4.1.0)


Trying URL: https://osf.io/g4fwn/?action=download
Downloading 20170413_optic_models.zip...
Status: 100%|###############################################################################| 17.7k/17.7k [00:00<00:00, 754kB/s]

Create temporary folder (/tmp/sct-20200226151136.767825-c_ijrofy)...

Unzip data to: /tmp/sct-20200226151136.767825-c_ijrofy

Check if folder already exists on the destination path...

Remove temporary folders...
Done!


sct_download_data -d pmj_models


--
Spinal Cord Toolbox (4.1.0)


Trying URL: https://osf.io/4gufr/?action=download
Downloading 20170922_pmj_models.zip...
Status: 100%|##############################################################################| 8.87k/8.87k [00:00<00:00, 2.91MB/s]

Create temporary folder (/tmp/sct-20200226151139.630205-0xbenq69)...

Unzip data to: /tmp/sct-20200226151139.630205-0xbenq69

Check if folder already exists on the destination path...

Remove temporary folders...
Done!


sct_download_data -d deepseg_sc_models


--
Spinal Cord Toolbox (4.1.0)


Trying URL: https://osf.io/avf97/?action=download
Downloading 20180610_deepseg_sc_models.zip...
Status: 100%|##############################################################################| 58.7M/58.7M [00:02<00:00, 26.4MB/s]

Create temporary folder (/tmp/sct-20200226151143.850584-1cgrt_e7)...

Unzip data to: /tmp/sct-20200226151143.850584-1cgrt_e7

Check if folder already exists on the destination path...

Remove temporary folders...
Done!


sct_download_data -d deepseg_gm_models


--
Spinal Cord Toolbox (4.1.0)


Trying URL: https://osf.io/b9y4x/?action=download
Downloading 20180205_deepseg_gm_models.zip...
Status: 100%|##############################################################################| 2.28M/2.28M [00:00<00:00, 5.72MB/s]

Create temporary folder (/tmp/sct-20200226151146.440101-fi82hge5)...

Unzip data to: /tmp/sct-20200226151146.440101-fi82hge5

Check if folder already exists on the destination path...

Remove temporary folders...
Done!


sct_download_data -d deepseg_lesion_models


--
Spinal Cord Toolbox (4.1.0)


Trying URL: https://osf.io/eg7v9/?action=download
Downloading 20180613_deepseg_lesion_models.zip...
Status: 100%|##############################################################################| 16.0M/16.0M [00:00<00:00, 19.3MB/s]

Create temporary folder (/tmp/sct-20200226151150.338698-0w5oynjg)...

Unzip data to: /tmp/sct-20200226151150.338698-0w5oynjg

Check if folder already exists on the destination path...

Remove temporary folders...
Done!


sct_download_data -d c2c3_disc_models


--
Spinal Cord Toolbox (4.1.0)


Trying URL: https://osf.io/t97ap/?action=download
Downloading 20190117_c2c3_disc_models.zip...
Status: 100%|##############################################################################| 8.94k/8.94k [00:00<00:00, 14.1MB/s]

Create temporary folder (/tmp/sct-20200226151152.671078-ggk2t0ji)...

Unzip data to: /tmp/sct-20200226151152.671078-ggk2t0ji

Check if folder already exists on the destination path...

Remove temporary folders...
Done!


In case an old version SCT is already installed (4.0.0-beta.1 or before), remove 'sct_env' declaration in RC file


Do you want to add the sct_* scripts to your PATH environment? [y]es/[n]o: y


Validate installation...


--
Spinal Cord Toolbox (4.1.0)

SCT info:
- version: 4.1.0
- path: /home/rosella/sct_4.1.0
OS: linux (Linux-3.16.0-4-amd64-x86_64-with-debian-bullseye-sid)
CPU cores: Available: 8, Used by SCT: 8
RAM: MemTotal:       32970652 kB
total       used       free     shared    buffers     cached
Mem:         32197      10832      21365         40       1027       7949
-/+ buffers/cache:       1855      30342
Swap:        57218          0      57218
Check Python executable.............................[OK]
  Using bundled python 3.6.10 |Anaconda, Inc.| (default, Jan  7 2020, 21:14:29)
[GCC 7.3.0] at /home/rosella/sct_4.1.0/python/envs/venv_sct/bin/python
Check if data are installed.........................[OK]
Check if numpy is installed.........................[OK] (1.18.1)
Check if cryptography is installed..................[OK] (2.8)
Check if dipy is installed..........................[OK] (1.1.1)
Check if futures is installed.......................[OK]
Check if h5py is installed..........................[OK] (2.10.0)
Check if Keras is installed.........................2020-02-26 15:12:09.525815: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2020-02-26 15:12:09.525910: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2020-02-26 15:12:09.525924: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
[OK] (2.3.1)
Check if matplotlib is installed....................[OK] (3.1.3)
Check if nibabel is installed.......................[OK] (3.0.1)
Check if pandas is installed........................[OK] (1.0.1)
Check if psutil is installed........................[OK] (5.7.0)
Check if pyqt5 is installed.........................[OK]
Check if pytest is installed........................[OK] (5.3.5)
Check if pytest-cov is installed....................[OK] (2.8.1)
Check if raven is installed.........................[OK]
Check if requests is installed......................[OK] (2.23.0)
Check if scipy is installed.........................[OK] (1.4.1)
Check if scikit-image is installed..................[OK] (0.16.2)
Check if scikit-learn is installed..................[OK] (0.22.1)
Check if tensorflow is installed....................[OK] (2.1.0)
Check if xlrd is installed..........................[OK] (1.2.0)
Check if xlutils is installed.......................[OK]
Check if xlwt is installed..........................[OK] (1.3.0)
Check if tqdm is installed..........................[OK] (4.43.0)
Check if transforms3d is installed..................[OK] (0.3.1)
Check if urllib3[secure] is installed...............[OK] (1.25.8)
Check if spinalcordtoolbox is installed.............[OK]
Check ANTs compatibility with OS ...................[OK]
Check PropSeg compatibility with OS ................[OK]
Check if figure can be opened.......................[OK]


Open a new Terminal window to load environment variables, or run:
source /home/rosella/.bashrc


Installation finished successfully!

Thank you for the feedback Rosella,
To make sure SCT works with all the functions, could you please also run the following:

sct_testing

And send us the Terminal output (p.s. you can use “~~~” before and after the copy/pasted code for a nice formatting)

rosella@vivi:~$ sct_testing

--
Spinal Cord Toolbox (4.2.1)

Will run through the following tests:
- sequentially: sct_deepseg_gm sct_deepseg_lesion sct_deepseg_sc
- in parallel with 8 jobs: sct_analyze_lesion sct_analyze_texture sct_apply_transfo sct_convert sct_compute_ernst_angle sct_compute_hausdorff_distance sct_compute_mtr sct_compute_mscc sct_compute_snr sct_concat_transfo sct_create_mask sct_crop_image sct_dice_coefficient sct_detect_pmj sct_dmri_compute_dti sct_dmri_concat_b0_and_dwi sct_dmri_concat_bvals sct_dmri_concat_bvecs sct_dmri_create_noisemask sct_dmri_compute_bvalue sct_dmri_moco sct_dmri_separate_b0_and_dwi sct_dmri_transpose_bvecs sct_extract_metric sct_flatten_sagittal sct_fmri_compute_tsnr sct_fmri_moco sct_get_centerline sct_image sct_label_utils sct_label_vertebrae sct_maths sct_merge_images sct_process_segmentation sct_propseg sct_qc sct_register_multimodal sct_register_to_template sct_resample sct_smooth_spinalcord sct_straighten_spinalcord sct_warp_template
Checking sct_deepseg_gm.............................[OK]
Checking sct_deepseg_lesion.........................[OK]
Checking sct_deepseg_sc.............................[OK]
Checking sct_analyze_lesion.........................[OK]
Checking sct_analyze_texture........................[OK]
Checking sct_apply_transfo..........................[OK]
Checking sct_convert................................[OK]
Checking sct_compute_ernst_angle....................[OK]
Checking sct_compute_hausdorff_distance.............[OK]
Checking sct_compute_mtr............................[OK]
Checking sct_compute_mscc...........................[OK]
Checking sct_compute_snr............................[OK]
Checking sct_concat_transfo.........................[OK]
Checking sct_create_mask............................[OK]
Checking sct_crop_image.............................[OK]
Checking sct_dice_coefficient.......................[OK]
Checking sct_detect_pmj.............................[OK]
Checking sct_dmri_compute_dti.......................[OK]
Checking sct_dmri_concat_b0_and_dwi.................[OK]
Checking sct_dmri_concat_bvals......................[OK]
Checking sct_dmri_concat_bvecs......................[OK]
Checking sct_dmri_create_noisemask..................[OK]
Checking sct_dmri_compute_bvalue....................[OK]
Checking sct_dmri_moco..............................[OK]
Checking sct_dmri_separate_b0_and_dwi...............[OK]
Checking sct_dmri_transpose_bvecs...................[OK]
Checking sct_extract_metric.........................[OK]
Checking sct_flatten_sagittal.......................[OK]
Checking sct_fmri_compute_tsnr......................[OK]
Checking sct_fmri_moco..............................[OK]
Checking sct_get_centerline.........................[OK]
Checking sct_image..................................[OK]
Checking sct_label_utils............................[OK]
Checking sct_label_vertebrae........................[FAIL]

   ====================================================================================================
   sct_label_vertebrae -i t2/t2.nii.gz -s t2/t2_seg.nii.gz -c t2 -initfile t2/init_label_vertebrae.txt -t template -qc testing-qc
   ====================================================================================================


   --
   Spinal Cord Toolbox (4.2.1)

   Folder testing-qc has been created.

   Create temporary folder (/tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i)...

   Copying input data to tmp folder...

   Straighten spinal cord...
   Reusing existing warping field which seems to be valid
   cp /home/rosella/sct_testing_data/warp_curve2straight.nii.gz warp_curve2straight.nii.gz
   cp /home/rosella/sct_testing_data/warp_straight2curve.nii.gz warp_straight2curve.nii.gz
   cp /home/rosella/sct_testing_data/straight_ref.nii.gz straight_ref.nii.gz
   sct_apply_transfo -i data.nii -w warp_curve2straight.nii.gz -d straight_ref.nii.gz -o data_straight.nii # in /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i

   Resample to 0.5mm isotropic...
   sct_resample -i data_straight.nii -mm 0.5x0.5x0.5 -x linear -o data_straightr.nii # in /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i

   Apply straightening to segmentation...
   /home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i segmentation.nii -r data_straightr.nii -t warp_curve2straight.nii.gz -o segmentation_straight.nii -n Linear # in /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i
   sct_maths -i segmentation_straight.nii -thr 0.5 -o segmentation_straight.nii # in /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i

   Create label to identify disc...
   Label #0: 26,29,34 --> 3
   WARNING: File /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i/labelz.nii.gz already exists. Will overwrite it.

   Done! To view results, type:
   fsleyes /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i/labelz.nii.gz &


   And apply straightening to label...
   /home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i labelz.nii.gz -r data_straightr.nii -t warp_curve2straight.nii.gz -o labelz_straight.nii.gz -n NearestNeighbor # in /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i

   Get z and disc values from straight label...
   .. [68, 3]

   Look for template...
   Path template: /home/rosella/sct_testing_data/template
   Traceback (most recent call last):
   File "/home/rosella/sct_4.2.1/scripts/sct_label_vertebrae.py", line 427, in <module>
   main()
   File "/home/rosella/sct_4.2.1/scripts/sct_label_vertebrae.py", line 372, in main
   verbose=verbose, path_template=path_template, path_output=path_output, scale_dist=scale_dist)
   File "/home/rosella/sct_4.2.1/spinalcordtoolbox/vertebrae/core.py", line 68, in vertebral_detection
   fname_template = get_file_label(os.path.join(path_template, 'template'), id_label=id_label_dct[contrast.upper()], output='filewithpath')  # label = *-weighted template
   File "/home/rosella/sct_4.2.1/spinalcordtoolbox/metadata.py", line 212, in get_file_label
   raise RuntimeError("Label ID {} not found in {}".format(id_label, fname_label))
   RuntimeError: Label ID 1 not found in /home/rosella/sct_testing_data/template/template/info_label.txt

   ====================================================================================================
   sct_label_vertebrae -i t2/t2.nii.gz -s t2/t2_seg.nii.gz -c t2 -discfile t2/labels.nii.gz
   ====================================================================================================


   --
   Spinal Cord Toolbox (4.2.1)


   Create temporary folder (/tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f)...

   Copying input data to tmp folder...

   Straighten spinal cord...
   Reusing existing warping field which seems to be valid
   cp /home/rosella/sct_testing_data/warp_curve2straight.nii.gz warp_curve2straight.nii.gz
   cp /home/rosella/sct_testing_data/warp_straight2curve.nii.gz warp_straight2curve.nii.gz
   cp /home/rosella/sct_testing_data/straight_ref.nii.gz straight_ref.nii.gz
   sct_apply_transfo -i data.nii -w warp_curve2straight.nii.gz -d straight_ref.nii.gz -o data_straight.nii # in /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f

   Resample to 0.5mm isotropic...
   sct_resample -i data_straight.nii -mm 0.5x0.5x0.5 -x linear -o data_straightr.nii # in /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f

   Apply straightening to segmentation...
   /home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i segmentation.nii -r data_straightr.nii -t warp_curve2straight.nii.gz -o segmentation_straight.nii -n Linear # in /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f
   sct_maths -i segmentation_straight.nii -thr 0.5 -o segmentation_straight.nii # in /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f

   Apply straightening to disc labels...
   /home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i /home/rosella/sct_testing_data/t2/labels.nii.gz -r data_straightr.nii -t warp_curve2straight.nii.gz -o labeldisc_straight.nii.gz -n NearestNeighbor # in /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f

   Un-straighten labeling...
   /home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i segmentation_straight_labeled.nii -r segmentation.nii -t warp_straight2curve.nii.gz -o segmentation_labeled.nii -n NearestNeighbor # in /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f

   Clean labeled segmentation (correct interpolation errors)...
   WARNING: File /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f/segmentation_labeled.nii already exists. Will overwrite it.

   Label discs...

   Generate output files...
   WARNING: File ./t2_seg_labeled.nii.gz already exists. Deleting it...
   sct_convert -i /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f/segmentation_labeled.nii -o ./t2_seg_labeled.nii.gz
   File created: ./t2_seg_labeled.nii.gz
   WARNING: File ./t2_seg_labeled_discs.nii.gz already exists. Deleting it...
   sct_convert -i /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f/segmentation_labeled_disc.nii -o ./t2_seg_labeled_discs.nii.gz
   File created: ./t2_seg_labeled_discs.nii.gz
   WARNING: File ./warp_curve2straight.nii.gz already exists. Deleting it...
   File created: ./warp_curve2straight.nii.gz
   WARNING: File ./warp_straight2curve.nii.gz already exists. Deleting it...
   File created: ./warp_straight2curve.nii.gz
   WARNING: File ./straight_ref.nii.gz already exists. Deleting it...
   File created: ./straight_ref.nii.gz

   Remove temporary files...
   rm -rf /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f

   Done! To view results, type:
   fsleyes /home/rosella/sct_testing_data/t2/t2.nii.gz -a 100.0 ./t2_seg_labeled.nii.gz -cm subcortical -a 50.0 &

   ====================================================================================================
   INTEGRITY TESTING
   ====================================================================================================


   Not implemented.
Checking sct_maths..................................[OK]
Checking sct_merge_images...........................[OK]
Checking sct_process_segmentation...................[OK]
Checking sct_propseg................................[OK]
Checking sct_qc.....................................[OK]
Checking sct_register_multimodal....................[OK]
Checking sct_register_to_template...................[FAIL]

   ====================================================================================================
   sct_register_to_template -i t2/t2.nii.gz -s t2/t2_seg.nii.gz -l t2/labels.nii.gz -param step=1,type=seg,algo=centermassrot,metric=MeanSquares:step=2,type=seg,algo=bsplinesyn,iter=5,metric=MeanSquares -t template -qc qc-testing
   ====================================================================================================


   --
   Spinal Cord Toolbox (4.2.1)

   Folder qc-testing has been created.
   Traceback (most recent call last):
   File "/home/rosella/sct_4.2.1/scripts/sct_register_to_template.py", line 807, in <module>
   main()
   File "/home/rosella/sct_4.2.1/scripts/sct_register_to_template.py", line 265, in main
   file_template = get_file_label(os.path.join(path_template, 'template'), id_label=id_label_dct[contrast_template.upper()])  # label = *-weighted template
   File "/home/rosella/sct_4.2.1/spinalcordtoolbox/metadata.py", line 212, in get_file_label
   raise RuntimeError("Label ID {} not found in {}".format(id_label, fname_label))
   RuntimeError: Label ID 1 not found in template/template/info_label.txt

   ====================================================================================================
   sct_register_to_template -i t2/t2.nii.gz -s t2/t2_seg.nii.gz -ldisc t2/labels.nii.gz -ref subject
   ====================================================================================================


   --
   Spinal Cord Toolbox (4.2.1)

   Estimate cord angle for each slice:   0%|                                  | 0/55 [00:00<?, ?iter/s]
   Estimate cord angle for each slice:  11%|██▊                       | 6/55 [00:00<00:00, 59.82iter/s]
   Estimate cord angle for each slice:  35%|████████▋                | 19/55 [00:00<00:00, 70.58iter/s]
   Estimate cord angle for each slice:  64%|███████████████▉         | 35/55 [00:00<00:00, 84.78iter/s]
   Estimate cord angle for each slice:  95%|███████████████████████▋ | 52/55 [00:00<00:00, 99.50iter/s]
   Estimate cord angle for each slice: 100%|████████████████████████| 55/55 [00:00<00:00, 128.66iter/s]
   Build 3D deformation field:   0%|                                          | 0/55 [00:00<?, ?iter/s]
   Build 3D deformation field:  11%|███▋                              | 6/55 [00:00<00:00, 53.60iter/s]
   Build 3D deformation field:  18%|██████                           | 10/55 [00:00<00:00, 47.43iter/s]
   Build 3D deformation field:  29%|█████████▌                       | 16/55 [00:00<00:00, 49.76iter/s]
   Build 3D deformation field:  40%|█████████████▏                   | 22/55 [00:00<00:00, 51.81iter/s]
   Build 3D deformation field:  51%|████████████████▊                | 28/55 [00:00<00:00, 53.36iter/s]
   Build 3D deformation field:  62%|████████████████████▍            | 34/55 [00:00<00:00, 54.53iter/s]
   Build 3D deformation field:  73%|████████████████████████         | 40/55 [00:00<00:00, 55.34iter/s]
   Build 3D deformation field:  84%|███████████████████████████▌     | 46/55 [00:00<00:00, 55.81iter/s]
   Build 3D deformation field:  95%|███████████████████████████████▏ | 52/55 [00:00<00:00, 56.26iter/s]
   Build 3D deformation field: 100%|█████████████████████████████████| 55/55 [00:01<00:00, 54.62iter/s]
   Check template files...
   OK: /home/rosella/sct_4.2.1/data/PAM50/template/PAM50_t2.nii.gz
   OK: /home/rosella/sct_4.2.1/data/PAM50/template/PAM50_levels.nii.gz
   OK: /home/rosella/sct_4.2.1/data/PAM50/template/PAM50_cord.nii.gz

   Check parameters:
   Data:                 t2/t2.nii.gz
   Landmarks:            t2/labels.nii.gz
   Segmentation:         t2/t2_seg.nii.gz
   Path template:        /home/rosella/sct_4.2.1/data/PAM50
   Remove temp files:    1

   Check input labels...

   Create temporary folder (/tmp/sct-20200226154206.779172-register_to_template-60y0kbpl)...

   Copying input data to tmp folder and convert to nii...
   WARNING: File /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl/template_label.nii.gz already exists. Will overwrite it.

   Check if provided labels are available in the template

   Binarize segmentation

   Done! To view results, type:
   fsleyes seg_bin.nii.gz &


   Change orientation of input images to RPI...

   Remove unused label on template. Keep only label present in the input label image...
   sct_label_utils -i template_label.nii.gz -o template_label.nii.gz -remove-reference /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl/label_projected_rpi.nii.gz # in /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl
   WARNING: File /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl/label_projected_rpi.nii.gz already exists. Will overwrite it.
   WARNING: File /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl/template_label.nii.gz already exists. Will overwrite it.

   Create temporary folder (/tmp/sct-20200226154212.995768-register-k5r630on)...

   Copying input data to tmp folder and convert to nii...

   --
   ESTIMATE TRANSFORMATION FOR STEP #0
   Registration parameters:
   type ........... label
   algo ........... syn
   slicewise ...... 0
   metric ......... MeanSquares
   iter ........... 10
   smooth ......... 0
   laplacian ...... 0
   shrink ......... 1
   gradStep ....... 0.5
   deformation .... 1x1x0
   init ...........
   poly ........... 5
   filter_size .... 5
   dof ............ Tx_Ty_Tz_Rx_Ry_Rz_Sz
   smoothWarpXY ... 2
   rot_method ..... pca
   Labels src: [[-0.0, 46.220001220703125, -107.84002685546875], [-0.0, 46.220001220703125, -144.84002685546875], [5.0, 46.220001220703125, -107.84002685546875]]
   Labels dest: [[7.2192840576171875, -1.7866058349609375, 24.678329467773438], [7.2192840576171875, -0.7866058349609375, -10.321670532226562], [12.219284057617188, -1.7866058349609375, 24.678329467773438]]
   Degrees of freedom (dof): Tx_Ty_Tz_Rx_Ry_Rz_Sz
   Optimization terminated successfully.
   Current function value: 0.000000
   Iterations: 8
   Function evaluations: 870
   Matrix:
   [[ 1.00000000e+00 -1.11442507e-12 -9.53408633e-14]
   [ 1.11669340e-12  9.99592086e-01  2.85597739e-02]
   [ 6.34742443e-14 -2.85597739e-02  9.99592086e-01]]
   Center:
   [ 8.88595072 -1.4532725  13.0116628 ]
   Translation:
   [[  -7.21928406   47.67327372 -133.18502299]]

   --
   ESTIMATE TRANSFORMATION FOR STEP #1

   Apply transformation from previous step

   Parse list of warping fields...

   Get dimensions of data...
   141 x 141 x 991 x 1

   Apply transformation...

   Apply transformation and resample to destination space...
   /home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i src.nii -o src_reg.nii -t warp_forward_0.txt -r dest_RPI.nii -n 'BSpline[3]' # in /tmp/sct-20200226154212.995768-register-k5r630on
   Copy affine matrix from destination space to make sure qform/sform are the same.
   WARNING: the resulting image could have wrong apparent results. You should use an affine transformation as last transformation...

   Done! To view results, type:
   fsleyes dest_RPI.nii src_reg.nii &


   Parse list of warping fields...

   Get dimensions of data...
   141 x 141 x 991 x 1

   Apply transformation...

   Apply transformation and resample to destination space...
   /home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i src_seg.nii -o src_seg_reg.nii -t warp_forward_0.txt -r dest_seg_RPI.nii -n NearestNeighbor # in /tmp/sct-20200226154212.995768-register-k5r630on
   Copy affine matrix from destination space to make sure qform/sform are the same.
   WARNING: the resulting image could have wrong apparent results. You should use an affine transformation as last transformation...

   Done! To view results, type:
   fsleyes dest_seg_RPI.nii src_seg_reg.nii &

   Registration parameters:
   type ........... imseg
   algo ........... centermassrot
   slicewise ...... 0
   metric ......... MeanSquares
   iter ........... 10
   smooth ......... 0
   laplacian ...... 0
   shrink ......... 1
   gradStep ....... 0.5
   deformation .... 1x1x0
   init ...........
   poly ........... 5
   filter_size .... 5
   dof ............ Tx_Ty_Tz_Rx_Ry_Rz
   smoothWarpXY ... 2
   rot_method ..... pcahog

   Create temporary folder (/tmp/sct-20200226154216.417014-register-tzc546hh)...

   Copy input data to temp folder...
   sct_convert -i src_reg.nii -o /tmp/sct-20200226154216.417014-register-tzc546hh/src.nii
   sct_convert -i src_seg_reg.nii -o /tmp/sct-20200226154216.417014-register-tzc546hh/src_seg.nii
   sct_convert -i dest_RPI.nii -o /tmp/sct-20200226154216.417014-register-tzc546hh/dest.nii
   sct_convert -i dest_seg_RPI.nii -o /tmp/sct-20200226154216.417014-register-tzc546hh/dest_seg.nii

   Get image dimensions of destination image...
   matrix size: 52 x 60 x 55
   voxel size:  1.0mm x 1.0mm x 1.0mm

   Split input segmentation...

   Split destination segmentation...

   Split input image...

   Split destination image...

   Generate warping field...
   --> step1Warp.nii.gz

   Generate warping field...
   --> step1InverseWarp.nii.gz

   Move warping fields...
   cp step1Warp.nii.gz /tmp/sct-20200226154212.995768-register-k5r630on
   cp step1InverseWarp.nii.gz /tmp/sct-20200226154212.995768-register-k5r630on
   rm -rf /tmp/sct-20200226154216.417014-register-tzc546hh

   --
   ESTIMATE TRANSFORMATION FOR STEP #2

   Apply transformation from previous step

   Parse list of warping fields...

   Get dimensions of data...
   141 x 141 x 991 x 1

   Apply transformation...

   Apply transformation and resample to destination space...
   /home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i src_seg.nii -o src_seg_reg.nii -t warp_forward_1.nii.gz warp_forward_0.txt -r dest_seg_RPI.nii -n NearestNeighbor # in /tmp/sct-20200226154212.995768-register-k5r630on
   Copy affine matrix from destination space to make sure qform/sform are the same.

   Done! To view results, type:
   fsleyes dest_seg_RPI.nii src_seg_reg.nii &

   Registration parameters:
   type ........... seg
   algo ........... bsplinesyn
   slicewise ...... 0
   metric ......... MeanSquares
   iter ........... 3
   smooth ......... 1
   laplacian ...... 0
   shrink ......... 1
   gradStep ....... 0.5
   deformation .... 1x1x0
   init ...........
   poly ........... 5
   filter_size .... 5
   dof ............ Tx_Ty_Tz_Rx_Ry_Rz
   smoothWarpXY ... 2
   rot_method ..... pca
   sct_image -i dest_seg_RPI.nii -o dest_seg_RPI_pad.nii -pad 0,0,10 # in /tmp/sct-20200226154212.995768-register-k5r630on

   Estimate transformation
   /home/rosella/sct_4.2.1/bin/isct_antsRegistration --dimensionality 3 --transform 'bsplinesyn[0.5,1,3]' --metric 'MeanSquares[dest_seg_RPI_pad.nii,src_seg_reg.nii,1,4]' --convergence 3 --shrink-factors 1 --smoothing-sigmas 1mm --restrict-deformation 1x1x0 --output '[step2,src_seg_reg_regStep2.nii]' --interpolation 'BSpline[3]' --verbose 1 # in /tmp/sct-20200226154212.995768-register-k5r630on

   Concatenate transformations...

   Parse list of warping fields...

   Check file existence...
   OK: dest.nii
   OK: warp_forward_0.txt
   OK: warp_forward_1.nii.gz
   OK: warp_forward_2.nii.gz
   /home/rosella/sct_4.2.1/bin/isct_ComposeMultiTransform 3 warp_final.nii.gz -R dest.nii warp_forward_2.nii.gz warp_forward_1.nii.gz warp_forward_0.txt # in /tmp/sct-20200226154212.995768-register-k5r630on

   Generate output files...
   File created: warp_src2dest.nii.gz

   Parse list of warping fields...

   Check file existence...
   OK: src.nii
   OK: warp_inverse_2.nii.gz
   OK: warp_inverse_1.nii.gz
   OK: warp_forward_0.txt
   /home/rosella/sct_4.2.1/bin/isct_ComposeMultiTransform 3 warp_final.nii.gz -R src.nii -i warp_forward_0.txt warp_inverse_1.nii.gz warp_inverse_2.nii.gz # in /tmp/sct-20200226154212.995768-register-k5r630on

   Generate output files...
   File created: warp_dest2src.nii.gz


   Apply transfo source --> dest...

   Parse list of warping fields...

   Get dimensions of data...
   141 x 141 x 991 x 1

   Apply transformation...

   Apply transformation and resample to destination space...
   /home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i src.nii -o src_reg.nii -t warp_src2dest.nii.gz -r dest.nii -n Linear # in /tmp/sct-20200226154212.995768-register-k5r630on
   Copy affine matrix from destination space to make sure qform/sform are the same.

   Done! To view results, type:
   fsleyes dest.nii src_reg.nii &


   Apply transfo dest --> source...

   Parse list of warping fields...

   Get dimensions of data...
   52 x 60 x 55 x 1

   Apply transformation...

   Apply transformation and resample to destination space...
   /home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i dest.nii -o dest_reg.nii -t warp_dest2src.nii.gz -r src.nii -n Linear # in /tmp/sct-20200226154212.995768-register-k5r630on
   Copy affine matrix from destination space to make sure qform/sform are the same.

   Done! To view results, type:
   fsleyes src.nii dest_reg.nii &


   Generate output files...
   File created: template_reg.nii
   File created: data_rpi_reg.nii
   File created: warp_template2data_rpi.nii.gz
   File created: warp_data_rpi2template.nii.gz

   Remove temporary files...
   rm -rf /tmp/sct-20200226154212.995768-register-k5r630on
   sct_apply_transfo -i template.nii -o template2anat.nii.gz -d data.nii -w warp_template2anat.nii.gz -crop 0 # in /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl
   sct_apply_transfo -i data.nii -o anat2template.nii.gz -d template.nii -w warp_anat2template.nii.gz -crop 0 # in /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl

   Generate output files...
   WARNING: File warp_template2anat.nii.gz already exists. Deleting it...
   File created: warp_template2anat.nii.gz
   WARNING: File warp_anat2template.nii.gz already exists. Deleting it...
   File created: warp_anat2template.nii.gz
   WARNING: File template2anat.nii.gz already exists. Deleting it...
   File created: template2anat.nii.gz
   WARNING: File anat2template.nii.gz already exists. Deleting it...
   File created: anat2template.nii.gz

   Delete temporary files...
   rm -rf /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl

   Finished! Elapsed time: 33s

   Done! To view results, type:
   fsleyes t2/t2.nii.gz template2anat.nii.gz &


   Done! To view results, type:
   fsleyes /home/rosella/sct_4.2.1/data/PAM50/template/PAM50_t2.nii.gz anat2template.nii.gz &

   ====================================================================================================
   INTEGRITY TESTING
   ====================================================================================================

   Dice[seg,template_seg_reg]: 0.970088122129825
   --> PASSED

   Dice[seg_reg,template_seg]: 0.9427385120689121
   --> PASSED
Checking sct_resample...............................[OK]
Checking sct_smooth_spinalcord......................[OK]
Checking sct_straighten_spinalcord..................[OK]
Checking sct_warp_template..........................[OK]
status: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]
Failures: sct_label_vertebrae sct_register_to_template
Finished! Elapsed time: 86s 

Hi Rosella,

The errors in sct_label_vertebrae and sct_register_to_template are likely related to the fact that there are now two installations of SCT on your station. You just installed SCT 4.1.0, but the sct_testing results shown above are using SCT 4.2.1. The two installations should not be mixed.

After you install SCT, you always need to start a new Terminal.

Could you please start a new Terminal and re-run (-d 1 to force download of data):

sct_testing -d 1

I found another error when trying to erode an image:
rosella@vivi:~/spinal_cord/1$ sct_maths -i kurtosis_crop_moco_dwi_mean.nii -erode 3,3,3 -o thr_seg.nii


Spinal Cord Toolbox (4.1.0)

Traceback (most recent call last):
File “/home/rosella/sct_4.1.0/scripts/sct_maths.py”, line 774, in
main()
File “/home/rosella/sct_4.1.0/scripts/sct_maths.py”, line 342, in main
data_out = erode(data, convert_list_str(arguments.erode))
TypeError: convert_list_str() missing 1 required positional argument: ‘type’

rosella@vivi:~$ sct_testing -d 1

--
Spinal Cord Toolbox (4.1.0)


Trying URL: https://osf.io/z8gaj/?action=download
Downloading 20180125_sct_testing_data.zip...
Status: 100%|####################################################################| 6.78M/6.78M [00:00<00:00, 7.22MB/s]

Create temporary folder (/tmp/sct-20200226171013.159120-rnaxjqaz)...

Unzip data to: /tmp/sct-20200226171013.159120-rnaxjqaz

Check if folder already exists on the destination path...
Folder sct_testing_data already exists. Removing it...

Remove temporary folders...
Done!

Will run through the following tests:
- sequentially: sct_deepseg_gm sct_deepseg_lesion sct_deepseg_sc
- in parallel with 8 jobs: sct_analyze_lesion sct_analyze_texture sct_apply_transfo sct_convert sct_compute_ernst_angle sct_compute_hausdorff_distance sct_compute_mtr sct_compute_mscc sct_compute_snr sct_concat_transfo sct_create_mask sct_crop_image sct_dice_coefficient sct_detect_pmj sct_dmri_compute_dti sct_dmri_concat_b0_and_dwi sct_dmri_concat_bvals sct_dmri_concat_bvecs sct_dmri_create_noisemask sct_dmri_compute_bvalue sct_dmri_moco sct_dmri_separate_b0_and_dwi sct_dmri_transpose_bvecs sct_extract_metric sct_flatten_sagittal sct_fmri_compute_tsnr sct_fmri_moco sct_get_centerline sct_image sct_label_utils sct_label_vertebrae sct_maths sct_merge_images sct_process_segmentation sct_propseg sct_qc sct_register_multimodal sct_register_to_template sct_resample sct_smooth_spinalcord sct_straighten_spinalcord sct_warp_template
Checking sct_deepseg_gm.............................[OK]
Checking sct_deepseg_lesion.........................[FAIL]

   ====================================================================================================
   sct_deepseg_lesion -i t2/t2.nii.gz -c t2
   ====================================================================================================


   --
   Spinal Cord Toolbox (4.1.0)

   2020-02-26 17:10:25.615796: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
   2020-02-26 17:10:25.615850: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
   2020-02-26 17:10:25.615856: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.

   Method:
   Centerline algorithm: svm
   Assumes brain section included in the image: True


   Create temporary folder (/tmp/sct-20200226171026.429946-5nmoucma)...
   Reorient the image to RPI, if necessary...

   Finding the spinal cord centerline...
   Remove temporary files...
   rm -rf /tmp/sct-20200226171026.679830-qoht8lru

   Cropping the image around the spinal cord...
   Normalizing the intensity...
   load data...

   Segmenting the MS lesions using deep learning on 3D patches...
   Traceback (most recent call last):
   File "/home/rosella/sct_4.1.0/scripts/sct_deepseg_lesion.py", line 178, in <module>
   main()
   File "/home/rosella/sct_4.1.0/scripts/sct_deepseg_lesion.py", line 154, in main
   brain_bool=brain_bool, remove_temp_files=remove_temp_files, verbose=verbose)
   File "/home/rosella/sct_4.1.0/spinalcordtoolbox/deepseg_lesion/core.py", line 197, in deep_segmentation_MSlesion
   im=im_res3d.copy())
   File "/home/rosella/sct_4.1.0/spinalcordtoolbox/deepseg_lesion/core.py", line 85, in segment_3d
   seg_model = load_trained_model(model_fname)
   File "/home/rosella/sct_4.1.0/spinalcordtoolbox/deepseg_sc/cnn_models_3d.py", line 94, in load_trained_model
   return load_model(model_file, custom_objects=custom_objects)
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/engine/saving.py", line 492, in load_wrapper
   return load_function(*args, **kwargs)
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/engine/saving.py", line 584, in load_model
   model = _deserialize_model(h5dict, custom_objects, compile)
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/engine/saving.py", line 274, in _deserialize_model
   model = model_from_config(model_config, custom_objects=custom_objects)
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/engine/saving.py", line 627, in model_from_config
   return deserialize(config, custom_objects=custom_objects)
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/layers/__init__.py", line 168, in deserialize
   printable_module_name='layer')
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 147, in deserialize_keras_object
   list(custom_objects.items())))
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/engine/network.py", line 1075, in from_config
   process_node(layer, node_data)
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/engine/network.py", line 1025, in process_node
   layer(unpack_singleton(input_tensors), **kwargs)
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 75, in symbolic_fn_wrapper
   return func(*args, **kwargs)
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/engine/base_layer.py", line 489, in __call__
   output = self.call(inputs, **kwargs)
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/layers/convolutional.py", line 179, in call
   dilation_rate=self.dilation_rate)
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 3965, in conv3d
   x, tf_data_format = _preprocess_conv3d_input(x, data_format)
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 3597, in _preprocess_conv3d_input
   if not _has_nchw_support():
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 522, in _has_nchw_support
   gpus_available = len(_get_available_gpus()) > 0
   File "/home/rosella/sct_4.1.0/python/envs/venv_sct/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 506, in _get_available_gpus
   _LOCAL_DEVICES = tf.config.experimental_list_devices()
   AttributeError: module 'tensorflow_core._api.v2.config' has no attribute 'experimental_list_devices'
Checking sct_deepseg_sc.............................[OK]
Checking sct_analyze_lesion.........................[OK]
Checking sct_analyze_texture........................[OK]
Checking sct_apply_transfo..........................[OK]
Checking sct_convert................................[OK]
Checking sct_compute_ernst_angle....................[OK]
Checking sct_compute_hausdorff_distance.............[OK]
Checking sct_compute_mtr............................[OK]
Checking sct_compute_mscc...........................[OK]
Checking sct_compute_snr............................[OK]
Checking sct_concat_transfo.........................[OK]
Checking sct_create_mask............................[OK]
Checking sct_crop_image.............................[OK]
Checking sct_dice_coefficient.......................[OK]
Checking sct_detect_pmj.............................[OK]
Checking sct_dmri_compute_dti.......................[OK]
Checking sct_dmri_concat_b0_and_dwi.................[OK]
Checking sct_dmri_concat_bvals......................[OK]
Checking sct_dmri_concat_bvecs......................[OK]
Checking sct_dmri_create_noisemask..................[OK]
Checking sct_dmri_compute_bvalue....................[OK]
Checking sct_dmri_moco..............................[OK]
Checking sct_dmri_separate_b0_and_dwi...............[OK]
Checking sct_dmri_transpose_bvecs...................[OK]
Checking sct_extract_metric.........................[OK]
Checking sct_flatten_sagittal.......................[OK]
Checking sct_fmri_compute_tsnr......................[OK]
Checking sct_fmri_moco..............................[OK]
Checking sct_get_centerline.........................[OK]
Checking sct_image..................................[OK]
Checking sct_label_utils............................[OK]
Checking sct_label_vertebrae........................[OK]
Checking sct_maths..................................[OK]
Checking sct_merge_images...........................[OK]
Checking sct_process_segmentation...................[OK]
Checking sct_propseg................................[OK]
Checking sct_qc.....................................[OK]
Checking sct_register_multimodal....................[OK]
Checking sct_register_to_template...................[OK]
Checking sct_resample...............................[OK]
Checking sct_smooth_spinalcord......................[OK]
Checking sct_straighten_spinalcord..................[OK]
Checking sct_warp_template..........................[OK]
status: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Failures: sct_deepseg_lesion
Finished! Elapsed time: 100s