Using the install script gives a undefined symbol error for shared object QtCore.so:
> ./install_sct-7.0_linux.sh
Check if pyqt5 (5.12.3) is installed................[FAIL]
An error occured while importing module pyqt5 -> /u3/SCT/sct_7.0/python/envs/venv_sct/lib/python3.9/site-packages/PyQt5/QtCore.so: undefined symbol: _ZdlPvm, version Qt_5
Full traceback: Traceback (most recent call last):
File "/u3/SCT/sct_6.5.dev0/spinalcordtoolbox/scripts/sct_check_dependencies.py", line 364, in main
module = module_import(module_name, suppress_stderr)
File "/u3/SCT/sct_6.5.dev0/spinalcordtoolbox/scripts/sct_check_dependencies.py", line 107, in module_import
module = importlib.import_module(module_name)
File "/u3/SCT/sct_7.0/python/envs/venv_sct/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 565, in module_from_spec
File "", line 1173, in create_module
File "", line 228, in _call_with_frames_removed
ImportError: /u3/SCT/sct_7.0/python/envs/venv_sct/lib/python3.9/site-packages/PyQt5/QtCore.so: undefined symbol: _ZdlPvm, version Qt_5
What could be the problem and how to fix it? I’m running the latest LTS version of UBUNTU-24.04.
Thank you for your help.
Jack van Asten.
(Radboud University Nijmegen, Netherlands).
Dear @Jack_van_Asten,
Thanks much for reporting this error! We’d be happy to help. 
The first thing I notice is that in the error log, there is mention of a secondary SCT installation (/u3/SCT/sct_6.5.dev0/
in addition to /u3/SCT/sct_7.0/
). It appears that when the installer script executes the command “sct_check_dependencies
”, what actually gets run is the sct_check_dependencies
script from the old sct_6.5.dev0/
installation. This is strange!
Just to double-check a few things:
Thank you kindly for your patience and understanding while we resolve this issue.
Kind regards,
Joshua
Hi Joshua,
Thank you very much for your quick response!
The former SCT version is still intact indeed:
which sct_check_dependencies
/u3/SCT/sct_6.5.dev0/bin/sct_check_dependencies
env |grep SCT_DIR
SCT_DIR=/u3/SCT/sct_6.5.dev0
I will run the install script install_sct-7.0_linux_into_u3_SCT.sh again with an empty environment variable SCT_DIR and changed former sct directory (to /u3/SCT/sct_6.5.dev0_).
I changed the install script slightly, to install SCT into a location that is accessible to several users at several servers.
Regards Jack.
Dear Joshua,
Unfortunately, the installation of SCT-7.0 still fails for the PyQt5 package. Again with the same ‘undefined symbol: _ZdlPvm’ error. See the attached ‘install_sct_log.txt’ file. We need this package to be able to re-label certain vertebra segmentations, in a comfortable manner.
By the way, to be able to install SCT in a custom directory, I changed this:
diff install_sct-7.0_linux.sh install_sct-7.0_linux_into_u3_SCT.sh
484c484,486
< SCT_DIR="$HOME/sct_$SCT_VERSION"
---
> #JvA:20241121; Install in custom directory.
> #SCT_DIR="$HOME/sct_$SCT_VERSION"
> SCT_DIR="/u3/SCT/sct_$SCT_VERSION"
Maybe, this would be a nice extra option to the installation script? To offer the possibility of a custom installation directory?
Thanks again in advance for your help.
Kind regards,
Jack van Asten.
(Radboud University Nijmegen, the Netherlands).
Maybe, this would be a nice extra option to the installation script? To offer the possibility of a custom installation directory?
Out of curiosity, are you running the script with the option -y
? I ask because, if -y
is not provided, then the script should prompt for the option to change the installation directory:
Please let me know if you don’t see this prompt!
See the attached ‘install_sct_log.txt’ file.
My apologies, but I don’t see any attachments. Perhaps I’m missing something, but would you be able to reupload this file?
Thanks much! 
Dear Joshua,
Thank you for your response.
I hope you can now receive the sct installation log file (apparently, the ‘upload’ button did not work):
install_sct_log.txt.gz (21.1 KB)
This is the log file, in which the Qt5 package error ‘undefined symbol: _ZdlPvm’ occurs.
I made some progress though, because I managed to install the toolbox on another Linux server (younger hardware, but same OS, UBUNTU-24.04.2 LTS) without any errors.
So, I guess the error message correlates with contradictory python versions? I would not expect this because the sct has it’s own python environment installed, isn’t it?
The command,
ldd /u3/SCT/sct_7.0/python/envs/venv_sct/lib/python3.9/site-packages/PyQt5/QtWidgets.so
shows no missing libraries. Do you maybe have another way to sought this out?
Last but not least, I owe you an apology because the installation scripts indeed offers the possibility to install SCT in a custom subdirectory. I completely overlooked that.
Again many thanks for your help.
Regards,
Jack van Asten.
(Radboud University Nijmegen, the Netherlands.
–