Problems installing FSL

Hi @Steven,

Thank you very much for your helpful suggestions! I’ll try using the Docker containers and fMRIPrep right away.

Best regards,
Yuhan

Hello,
Apple Silicon m3 with MacOS Sonoma 14.3. (Should work with all M1, M2 and M3). Following these steps I could install FSL correctly. All thanks to @aymen_meddeb’s hint. Hopefully this post can be helpful for others. The problem seems to be due to some incompatibility between Anaconda’s mamba package installed by default in base environment and the mamba package specified by FSL’s installation. So a regular python installation, rather than Anaconda, should also probably work. But, in case you just want it to work and you are an Anaconda user…

  1. Create an empty python environment (you can specify your own python version or none at all). This is only needed for the installation process. Once FSL is correctly installed you can go back to your regular python envs.
conda create --name fsl_install_env python=3.11
  1. Activate it.
conda activate fsl_install_env
  1. run the installation script. No need to specify flags like --conda etc… Your actual command might be different, but should be similar to.
python fslinstaller.py
  1. When FSL is correctly installed, you can activate your previously active env and delete this one. To properly configure FSL you can open a new terminal and call FSL, as specified in FSL’s installation instructions.
fsl &

or

fsleyes &

should work.

Hope this helps.

1 Like

Hi Juan,

I get this error as well, even after trying your fix. I have an Intel based Mac, and am currently using miniconda3. Do you have any insight?

Thank you!

@paulmccarthy

I am having a similar issues as the others when trying to download FSL.

Ive tried both mamba and conda, but I get an error message after only a minutes. It also never goes above 0% downloaded.

I’ll included the error message I keep getting.

Hi @Kvandeloo and @Tru_Gamble, can you both please share the installer log file?

Here it is.

It looks like you’ve attached the installer script itself, not the log file that is mentioned in the output you pasted earlier.

@paulmccarthy

FYI I’m using a 10-core i9 iMac w/ 128GB RAM, with miniconda3

Command:

Log:

Hi @Kvandeloo, could you please:

  1. Re-download the fslinstaller.py script from https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py
  2. Re-run this new version without the --conda option
    and, if it doesn’t work, report back what happens (including the log file)?
1 Like

Ah yeah oops. I am having a different issue now though. It starts installing but is getting stuck at 92%.

Ok I tried to re-install it, but it said the package was already on my device…
I think this was the log file you were referring to though.

Hi @paulmccarthy ,

Here is the prompt:

And the log:

Hi @Kvandeloo, could you try running the installer (the new version that you downloaded) with this command:

python fslinstaller.py --miniconda https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh

Hi @Tru_Gamble, could you re-download the fslinstaller.py script from https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py, and re-run it with this command (it should report itself as being version 3.8.2):

python fslinstaller.py --miniconda https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh
1 Like

Hey @paulmccarthy, thanks a lot.
This works.

My macbook air OS14-Sonoma was having same problem like @Tru_Gamble had which fsl installation stopping at 92%. I have tried all other above solutions like
1)creating new env(stopped at 92%)
2) --conda(stops before starting fsl installation)
nothing works.

Finally this works.

Thanks so much - this worked!

1 Like

Hi NeuroStars,

I’m trying to install fsl on a HPC but it fails few minutes into the installation. Could you advise which version to choose and if there’s any specific flags to use to compensate for no root privileges?

Command used

python fslinstaller.py # installed into scratch
# also tried with python2 and --conda

Part of the log file (with the error):
09:23:56 fslinstaller.py:1084: [stderr]: # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
09:23:56 fslinstaller.py:1084: [stderr]:
09:23:56 fslinstaller.py:1084: [stderr]: Traceback (most recent call last):
09:23:56 fslinstaller.py:1084: [stderr]: File “/mnt/shared/scratch/kmarians/apps/fsl/lib/python3.10/site-packages/conda/exception_handler.py”, line 17, in call
09:23:56 fslinstaller.py:1084: [stderr]: return func(*args, **kwargs)
09:23:56 fslinstaller.py:1084: [stderr]: File “/mnt/shared/scratch/kmarians/apps/fsl/lib/python3.10/site-packages/conda_env/cli/main.py”, line 56, in do_call
09:23:56 fslinstaller.py:1084: [stderr]: exit_code = getattr(module, func_name)(arguments, parser)
09:23:56 fslinstaller.py:1084: [stderr]: File “/mnt/shared/scratch/kmarians/apps/fsl/lib/python3.10/site-packages/conda/notices/core.py”, line 124, in wrapper
09:23:56 fslinstaller.py:1084: [stderr]: return func(*args, **kwargs)
09:23:56 fslinstaller.py:1084: [stderr]: File “/mnt/shared/scratch/kmarians/apps/fsl/lib/python3.10/site-packages/conda_env/cli/main_update.py”, line 143, in execute
09:23:56 fslinstaller.py:1084: [stderr]: result[installer_type] = installer.install(prefix, specs, args, env)
09:23:56 fslinstaller.py:1084: [stderr]: File “/mnt/shared/scratch/kmarians/apps/fsl/lib/python3.10/site-packages/mamba/mamba_env.py”, line 155, in mamba_install
09:23:56 fslinstaller.py:1084: [stderr]: transaction.fetch_extract_packages()
09:23:56 fslinstaller.py:1084: [stderr]: RuntimeError: Resource temporarily unavailable
09:23:56 fslinstaller.py:1084: [stderr]:
09:23:56 fslinstaller.py:1084: [stderr]: $ /home/kmarians/scratch/apps/fsl/bin/mamba update -p /home/kmarians/scratch/apps/fsl -f /tmp/tmpypxrahjp/fsl-6.0.7.7_linux-64.yml
09:23:56 fslinstaller.py:1084: [stderr]:
09:23:56 fslinstaller.py:1084: [stderr]: environment variables:
09:23:56 fslinstaller.py:1084: [stderr]: CIO_TEST=
09:23:56 fslinstaller.py:1084: [stderr]: CONDA_AUTO_UPDATE_CONDA=false
09:23:56 fslinstaller.py:1084: [stderr]: CONDA_ROOT=/mnt/shared/scratch/kmarians/apps/fsl
09:23:56 fslinstaller.py:1084: [stderr]: CURL_CA_BUNDLE=
09:23:56 fslinstaller.py:1084: [stderr]: LD_LIBRARY_PATH=/opt/slurm/latest/lib64
09:23:56 fslinstaller.py:1084: [stderr]: LD_PRELOAD=
09:23:56 fslinstaller.py:1084: [stderr]: MANPATH=/opt/slurm/latest/share/man/:/opt/slurm/latest/share/man/:/opt/slurm/l
09:23:56 fslinstaller.py:1084: [stderr]: atest/share/man/::
09:23:56 fslinstaller.py:1084: [stderr]: MODULEPATH=/etc/scl/modulefiles:/etc/scl/modulefiles:/etc/scl/modulefiles:/usr/sh
09:23:56 fslinstaller.py:1084: [stderr]: are/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles
09:23:56 fslinstaller.py:1084: [stderr]: PATH=/opt/openmpi/latest/bin:/opt/slurm/latest/bin:/mnt/shared/apps/guppy/4
09:23:56 fslinstaller.py:1084: [stderr]: .2.2:/mnt/shared/apps/aspera/3.9.2/bin:/mnt/cluster/scripts:/mnt/share
09:23:56 fslinstaller.py:1084: [stderr]: d/scratch/kmarians/apps/conda/bin:/opt/openmpi/latest/bin:/opt/slurm/l
09:23:56 fslinstaller.py:1084: [stderr]: atest/bin:/mnt/shared/apps/guppy/4.2.2:/mnt/shared/apps/aspera/3.9.2/b
09:23:56 fslinstaller.py:1084: [stderr]: in:/mnt/cluster/scripts:/mnt/shared/scratch/kmarians/apps/conda/bin:/h
09:23:56 fslinstaller.py:1084: [stderr]: ome/kmarians/.local/bin:/home/kmarians/bin:/opt/openmpi/latest/bin:/op
09:23:56 fslinstaller.py:1084: [stderr]: t/slurm/latest/bin:/usr/share/Modules/bin:/mnt/shared/apps/guppy/4.2.2
09:23:56 fslinstaller.py:1084: [stderr]: :/mnt/shared/apps/aspera/3.9.2/bin:/mnt/cluster/scripts:/mnt/shared/sc
09:23:56 fslinstaller.py:1084: [stderr]: ratch/kmarians/apps/conda/condabin:/mnt/shared/scratch/kmarians/apps/c
09:23:56 fslinstaller.py:1084: [stderr]: onda/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
09:23:56 fslinstaller.py:1084: [stderr]: REQUESTS_CA_BUNDLE=
09:23:56 fslinstaller.py:1084: [stderr]: SSL_CERT_FILE=
09:23:56 fslinstaller.py:1084: [stderr]:
09:23:56 fslinstaller.py:1084: [stderr]: active environment : None
09:23:56 fslinstaller.py:1084: [stderr]: user config file : /home/kmarians/.condarc
09:23:56 fslinstaller.py:1084: [stderr]: populated config files : /mnt/shared/scratch/kmarians/apps/fsl/.condarc
09:23:56 fslinstaller.py:1084: [stderr]: /home/kmarians/.condarc
09:23:56 fslinstaller.py:1084: [stderr]: /home/kmarians/scratch/apps/fsl/.condarc
09:23:56 fslinstaller.py:1084: [stderr]: conda version : 23.11.0
09:23:56 fslinstaller.py:1084: [stderr]: conda-build version : not installed
09:23:56 fslinstaller.py:1084: [stderr]: python version : 3.10.13.final.0
09:23:56 fslinstaller.py:1084: [stderr]: solver : libmamba (default)
09:23:56 fslinstaller.py:1084: [stderr]: virtual packages : __archspec=1=skylake_avx512
09:23:56 fslinstaller.py:1084: [stderr]: __conda=23.11.0=0
09:23:56 fslinstaller.py:1084: [stderr]: __glibc=2.28=0
09:23:56 fslinstaller.py:1084: [stderr]: __linux=4.18.0=0
09:23:56 fslinstaller.py:1084: [stderr]: __unix=0=0
09:23:56 fslinstaller.py:1084: [stderr]: base environment : /mnt/shared/scratch/kmarians/apps/fsl (writable)
09:23:56 fslinstaller.py:1084: [stderr]: conda av data dir : /mnt/shared/scratch/kmarians/apps/fsl/etc/conda
09:23:56 fslinstaller.py:1084: [stderr]: conda av metadata url : None
09:23:56 fslinstaller.py:1084: [stderr]: channel URLs : public/linux-64
09:23:56 fslinstaller.py:1084: [stderr]: public/noarch
09:23:56 fslinstaller.py:1084: [stderr]: conda-forge/linux-64
09:23:56 fslinstaller.py:1084: [stderr]: conda-forge/noarch
09:23:56 fslinstaller.py:1084: [stderr]: package cache : /home/kmarians/scratch/apps/fsl/pkgs
09:23:56 fslinstaller.py:1084: [stderr]: envs directories : /mnt/shared/scratch/kmarians/apps/fsl/envs
09:23:56 fslinstaller.py:1084: [stderr]: /home/kmarians/.conda/envs
09:23:56 fslinstaller.py:1084: [stderr]: platform : linux-64
09:23:56 fslinstaller.py:1084: [stderr]: user-agent : conda/23.11.0 requests/2.31.0 CPython/3.10.13 Linux/4.18.0-513.11.1.el8_9.0.1.x86_64 rocky/8.9 glibc/2.28 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.5
09:23:56 fslinstaller.py:1084: [stderr]: UID:GID : 896600222:896600222
09:23:56 fslinstaller.py:1084: [stderr]: netrc file : None
09:23:56 fslinstaller.py:1084: [stderr]: offline mode : False
09:23:56 fslinstaller.py:1084: [stderr]:
09:23:56 fslinstaller.py:1084: [stderr]:
09:23:56 fslinstaller.py:1084: [stderr]: An unexpected error has occurred. Conda has prepared the above report.
09:23:56 fslinstaller.py:1084: [stderr]: If you suspect this error is being caused by a malfunctioning plugin,
09:23:56 fslinstaller.py:1084: [stderr]: consider using the --no-plugins option to turn off plugins.
09:23:56 fslinstaller.py:1084: [stderr]:
09:23:56 fslinstaller.py:1084: [stderr]: Example: conda --no-plugins install
09:23:56 fslinstaller.py:1084: [stderr]:
09:23:56 fslinstaller.py:1084: [stderr]: Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
09:23:56 fslinstaller.py:1084: [stderr]: the command line to run the command without plugins enabled.
09:23:56 fslinstaller.py:1084: [stderr]:
09:23:56 fslinstaller.py:1084: [stderr]: Example: CONDA_NO_PLUGINS=true conda install
09:23:56 fslinstaller.py:1084: [stderr]:
09:23:58 fslinstaller.py:1084: [stderr]: error libmamba Error when extracting package: std::bad_alloc
09:23:58 fslinstaller.py:1084: [stderr]: terminate called after throwing an instance of ‘std::bad_alloc’
09:23:58 fslinstaller.py:1084: [stderr]: what(): std::bad_alloc
09:24:00 fslinstaller.py: 206:
ERROR occurred during installation!
09:24:00 fslinstaller.py: 206: This command returned an error: /home/kmarians/scratch/apps/fsl/bin/mamba env update -p /home/kmarians/scratch/apps/fsl -f /tmp/tmpypxrahjp/fsl-6.0.7.7_linux-64.yml

09:24:00 fslinstaller.py:2768: File “/mnt/shared/scratch/kmarians/apps/FSL/fslinstaller.py”, line 2760, in handle_error
yield
File “/mnt/shared/scratch/kmarians/apps/FSL/fslinstaller.py”, line 2875, in main
install_fsl(ctx)
File “/mnt/shared/scratch/kmarians/apps/FSL/fslinstaller.py”, line 2138, in install_fsl
ctx.run(Process.monitor_progress, cmd,
File “/mnt/shared/scratch/kmarians/apps/FSL/fslinstaller.py”, line 1586, in run
return process_func(admin=self.need_admin,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/mnt/shared/scratch/kmarians/apps/FSL/fslinstaller.py”, line 1056, in monitor_progress
raise RuntimeError('This command returned ’ …

(happy to include the entire log file if that helps)


Hi @km345, this looks like some sort of a system issue - how much RAM does your system have, and how much free disk space do you have in your scratch folder? FSL needs over 10GB of space when installed.

Hi @paulmccarthy, the head node has 6 Gb of RAM but I now requested a worker node with 32 Gb of RAM. Not sure how much disk space there is but it should not be a problem on a HPC. With 32 Gb RAM the installer fails at 6% with an error:
ERROR occurred during installation! [Errno 2] No such file or directory: '/home/kmarians/scratch/apps/fsl/pkgs/fsl-data_first_models_317_bin-2006.0-0.tar.bz2'

Can you share the log file?

I would confirm with your IT team how much storage space you have available - on a HPC it is common for per-user/group storage limits to be enforced.