Problem with latest version installation

--
Spinal Cord Toolbox (4.2.1)

SCT info:
- version: 4.2.1
- path: /root/sct_4.2.1
OS: linux (Linux-3.16.0-4-amd64-x86_64-with-debian-8.11)
CPU cores: Available: 8, Used by SCT: 8
RAM: MemTotal:       32970652 kB
total       used       free     shared    buffers     cached
Mem:         32197      28304       3893       5425       3486      14167
-/+ buffers/cache:      10650      21547
Swap:        57218        942      56276
Check Python executable.............................[OK]
  Using bundled python 3.6.10 |Anaconda, Inc.| (default, Jan  7 2020, 21:14:29) 
[GCC 7.3.0] at /root/sct_4.2.1/python/envs/venv_sct/bin/python
Check if data are installed.........................[OK]
Check if numpy is installed.........................[OK] (1.17.4)
Check if cryptography is installed..................[OK] (2.8)
Check if dipy is installed..........................[OK] (1.0.0)
Check if futures is installed.......................[OK]
Check if h5py is installed..........................[OK] (2.10.0)
Check if Keras is installed.........................generated new fontManager
[OK] (2.3.1)
Check if matplotlib is installed....................[OK] (3.1.2)
Check if nibabel is installed.......................[OK] (3.0.0)
Check if pandas is installed........................[OK] (0.25.3)
Check if psutil is installed........................[OK] (5.6.7)
Check if pyqt5 (5.11.3) is installed................[OK]
Check if pytest is installed........................[OK] (5.3.2)
Check if pytest-cov is installed....................[OK] (2.8.1)
Check if raven is installed.........................[OK]
Check if requests is installed......................[OK] (2.22.0)
Check if scipy is installed.........................[OK] (1.4.0)
Check if scikit-image is installed..................[FAIL]
dlopen: cannot load any more object with static TLS
It seems that scikit-image has not been built correctly.

Your install of scikit-image appears to be broken.
Try re-installing the package following the instructions at:
https://scikit-image.org/docs/stable/install.html 
Check if scikit-learn is installed..................[FAIL]
dlopen: cannot load any more object with static TLS
___________________________________________________________________________
Contents of /root/sct_4.2.1/python/envs/venv_sct/lib/python3.6/site-packages/sklearn/__check_build:
__init__.py               _check_build.cpython-36m-x86_64-linux-gnu.sosetup.py
__pycache__
___________________________________________________________________________
It seems that scikit-learn has not been built correctly.

If you have installed scikit-learn from source, please do not forget
to build the package before using it: run `python setup.py install` or
`make` in the source directory.

If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.
Check if tensorflow is installed....................[OK] (2.0.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.40.2)
Check if transforms3d is installed..................[OK] (0.3.1)
Check if urllib3[secure] is installed...............[OK] (1.25.7)
Check if spinalcordtoolbox is installed.............[OK]
Check ANTs compatibility with OS ...................[OK]
Check PropSeg compatibility with OS ................[OK]
Check if DISPLAY variable is set....................[OK]
Check if figure can be opened with PyQt.............Traceback (most recent call last):
  File "/root/sct_4.2.1/scripts/sct_check_dependencies.py", line 379, in <module>
    main()
  File "/root/sct_4.2.1/scripts/sct_check_dependencies.py", line 356, in main
    from PyQt5.QtWidgets import QApplication, QLabel
ImportError: dlopen: cannot load any more object with static TLS

Hi
As you can see you only have 3893kB of free RAM, which is not enough to run SCT. Could you please free up at least 2GB of RAM and re-run the installation?

But why does the installation fails in scikit-image ?
thanks
Rosella

SCT info:
- version: 4.2.1
- path: /home/rosella/sct_4.2.1
OS: linux (Linux-3.16.0-4-amd64-x86_64-with-debian-8.11)
CPU cores: Available: 8, Used by SCT: 8
RAM: MemTotal:       32970652 kB
total       used       free     shared    buffers     cached
Mem:         32197      21159      11038       5272       3423      15192
-/+ buffers/cache:       2542      29655
Swap:        57218        977      56241
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.2.1/python/envs/venv_sct/bin/python
Check if data are installed.........................[OK]
Check if numpy is installed.........................[OK] (1.17.4)
Check if cryptography is installed..................[OK] (2.8)
Check if dipy is installed..........................[OK] (1.0.0)
Check if futures is installed.......................[OK]
Check if h5py is installed..........................[OK] (2.10.0)
Check if Keras is installed.........................[OK] (2.3.1)
Check if matplotlib is installed....................[OK] (3.1.2)
Check if nibabel is installed.......................[OK] (3.0.0)
Check if pandas is installed........................[OK] (0.25.3)
Check if psutil is installed........................[OK] (5.6.7)
Check if pyqt5 (5.11.3) is installed................[OK]
Check if pytest is installed........................[OK] (5.3.2)
Check if pytest-cov is installed....................[OK] (2.8.1)
Check if raven is installed.........................[OK]
Check if requests is installed......................[OK] (2.22.0)
Check if scipy is installed.........................[OK] (1.4.0)
Check if scikit-image is installed..................[FAIL]
dlopen: cannot load any more object with static TLS
It seems that scikit-image has not been built correctly.

Your install of scikit-image appears to be broken.
Try re-installing the package following the instructions at:
https://scikit-image.org/docs/stable/install.html 
Check if scikit-learn is installed..................[FAIL]
dlopen: cannot load any more object with static TLS
___________________________________________________________________________
Contents of /home/rosella/sct_4.2.1/python/envs/venv_sct/lib/python3.6/site-packages/sklearn/__check_build:
__init__.py               _check_build.cpython-36m-x86_64-linux-gnu.so__pycache__
setup.py
___________________________________________________________________________
It seems that scikit-learn has not been built correctly.

If you have installed scikit-learn from source, please do not forget
to build the package before using it: run `python setup.py install` or
`make` in the source directory.

If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.
Check if tensorflow is installed....................[OK] (2.0.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.40.2)
Check if transforms3d is installed..................[OK] (0.3.1)
Check if urllib3[secure] is installed...............[OK] (1.25.7)
Check if spinalcordtoolbox is installed.............[OK]
Check ANTs compatibility with OS ...................[OK]
Check PropSeg compatibility with OS ................[OK]
Check if DISPLAY variable is set....................[OK]
Check if figure can be opened with PyQt.............Traceback (most recent call last):
  File "/home/rosella/sct_4.2.1/scripts/sct_check_dependencies.py", line 379, in <module>
    main()
  File "/home/rosella/sct_4.2.1/scripts/sct_check_dependencies.py", line 356, in main
    from PyQt5.QtWidgets import QApplication, QLabel
ImportError: dlopen: cannot load any more object with static TLS

Installation validation Failed!

Please copy the historic of this Terminal (starting with the command install_sct) and paste it in the SCT Help forum (create a new discussion):

http://forum.spinalcordmri.org/c/sct


Installation failed

I have tried freeing some RAM but the same error persists.
Thanks,
Rosella

could you please try running sct_testing and copy/paste the output? thanks

--
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