"max() arg is an empty sequence" error during ANTs check in `sct_check_dependencies`

Hi,

I was checking my dependencies after my new installation on Windows 10 for SCT 7.0 and it all works except for ANTs, is there a way i can compile this without needing to install Ubuntu.

Check ANTs compatibility with OS …[FAIL]

Dear @sabaig,

Could you please run the command sct_check_dependencies and copy and paste the full output?

(I would like to help debug, though the [FAIL] does not tell me much about the nature of the error.)

Kind regards,
Joshua

Sure

SYSTEM INFORMATION
------------------
SCT info:
- version: 7.0
- path: C:\Users\sbaig\sct_7.0
OS: windows (Windows-10-10.0.17763-SP0)
CPU cores: Available: 12, Used by ITK functions: 12
RAM: Total: 65446MB, Used: 22116MB, Available: 43330MB

MANDATORY DEPENDENCIES
----------------------
Check Python executable.............................[OK]
  Using bundled python 3.9.23 | packaged by conda-forge | (main, Jun  4 2025, 17:49:16) [MSC v.1929 64 bit (AMD64)] at C:\Users\sbaig\sct_7.0\python\envs\venv_sct\python.exe
Check if acvl_utils is installed....................[OK]
Check if dipy is installed..........................[OK] (1.8.0)
Check if ivadomed is installed......................[OK] (2.9.10)
Check if matplotlib is installed....................[OK] (3.9.4)
Check if matplotlib-inline is installed.............[OK]
Check if monai is installed.........................[OK] (1.4.0)
Check if msvc-runtime (14.29.30133) is installed....[OK]
Check if nibabel is installed.......................[OK] (5.3.2)
Check if nilearn is installed.......................[OK] (0.10.4)
Check if nnunetv2 is installed......................[OK]
Check if numpy is installed.........................[OK] (1.26.4)
Check if onnxruntime is installed...................[OK] (1.19.2)
Check if pandas is installed........................[OK] (1.5.3)
Check if portalocker is installed...................[OK] (3.1.1)
Check if psutil is installed........................[OK] (7.0.0)
Check if pyqt5 (5.12.3) is installed................[OK] (5.12.3)
Check if pyqt5-sip is installed.....................[OK]
Check if pystrum is installed.......................[OK] (0.4)
Check if pytest is installed........................[OK] (8.3.5)
Check if pytest-cov is installed....................[OK] (6.1.1)
Check if requests is installed......................[OK] (2.32.3)
Check if requirements-parser is installed...........[OK] (0.11.0)
Check if scipy is installed.........................[OK] (1.13.1)
Check if scikit-image is installed..................[OK] (0.24.0)
Check if scikit-learn is installed..................[OK] (1.6.1)
Check if totalspineseg is installed.................[OK] (20250205)
Check if xlwt is installed..........................[OK] (1.3.0)
Check if torch is installed.........................[OK] (2.2.2+cpu)
Check if tqdm is installed..........................[OK] (4.67.1)
Check if transforms3d is installed..................[OK] (0.4.2)
Check if urllib3 is installed.......................[OK] (2.4.0)
Check if pytest_console_scripts is installed........[OK]
Check if pyyaml is installed........................[OK] (6.0.2)
Check if voxelmorph is installed....................[OK] (0.2)
Check if wquantiles is installed....................[OK] (0.4)
Check if xlsxwriter is installed....................[OK] (3.2.3)
Check if spinalcordtoolbox is installed.............[OK]
Check ANTs compatibility with OS ...................[FAIL]
============================= test session starts =============================
platform win32 -- Python 3.9.23, pytest-8.3.5, pluggy-1.5.0
rootdir: C:\Users\sbaig\sct_7.0
configfile: setup.cfg
plugins: console-scripts-1.4.1, cov-6.1.1
collected 1 item

sct_7.0\testing\dependencies\test_ants.py E                              [100%]Traceback (most recent call last):
File "C:\Users\sbaig\sct_7.0\spinalcordtoolbox\scripts\sct_testing.py", line 22, in <module>
sys.exit(pytest.main(sys.argv[1:] if sys.argv[1:] else [__sct_dir__]))
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\_pytest\config\__init__.py", line 175, in main
ret: ExitCode | int = config.hook.pytest_cmdline_main(config=config)
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\pluggy\_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\pluggy\_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\pluggy\_callers.py", line 139, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\pluggy\_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\_pytest\main.py", line 330, in pytest_cmdline_main
return wrap_session(config, _main)
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\_pytest\main.py", line 318, in wrap_session
config.hook.pytest_sessionfinish(
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\pluggy\_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\pluggy\_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\pluggy\_callers.py", line 139, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\pluggy\_callers.py", line 122, in _multicall
teardown.throw(exception)  # type: ignore[union-attr]
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\_pytest\logging.py", line 868, in pytest_sessionfinish
return (yield)
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\pluggy\_callers.py", line 122, in _multicall
teardown.throw(exception)  # type: ignore[union-attr]
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\_pytest\terminal.py", line 893, in pytest_sessionfinish
result = yield
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\pluggy\_callers.py", line 122, in _multicall
teardown.throw(exception)  # type: ignore[union-attr]
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\_pytest\warnings.py", line 141, in pytest_sessionfinish
return (yield)
File "C:\Users\sbaig\sct_7.0\python\envs\venv_sct\lib\site-packages\pluggy\_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
File "C:\Users\sbaig\sct_7.0\testing\conftest.py", line 46, in pytest_sessionfinish
tmp_path = max(
ValueError: max() arg is an empty sequence
Skipping PropSeg compatibility check ...............[  ] (Not supported on 'native' Windows (without WSL))
Check if figure can be opened with PyQt.............[OK]
Check if figure can be opened with matplotlib.......[OK] (Using GUI backend: 'qtagg')
Check data dependency 'PAM50'.......................[OK]
Check data dependency 'deepseg_gm_models'...........[OK]
Check data dependency 'deepseg_sc_models'...........[OK]
Check data dependency 'deepseg_lesion_models'.......[OK]
Check data dependency 'deepreg_models'..............[OK]
Check data dependency 'PAM50_normalized_metrics'....[OK]
Check data dependency 'binaries_win'................[OK]

Total runtime; 14.390 seconds.

Dear @sabaig,

I believe that it should be safe to ignore this message for now. It should not appear during processing (only sct_check_dependencies).

(This looks to be an error related purely to our testing script (conftest.py) and unrelated to ANTs, meaning that SCT itself should function perfectly fine.)

I have opened a ticket to fix this error and prevent this noisy message from appearing. Otherwise, please enjoy using SCT.

Kind regards,
Joshua

1 Like

A post was split to a new topic: Local DTI extraction results don’t match the values given in the tutorial

SCT packages ANTs as precompiled binary files, and these files have been unchanged for several years now.

So, if there are issues related to DTI extraction, I suspect that they may be due to some non-ANTs reason (as you also suggested). I would be happy to help debug these issues with you. :slight_smile:

I am just going to move your most recent reply into a separate thread. That way, the forum stays easy to search, with 1 issue per forum thread. Give me one moment.

Thank you kindly,
Joshua