Installing FSL on Windows 10 using WSL
Vložit
- čas přidán 22. 07. 2024
- A step-by-step guide to install FSL on Windows 10 using Windows Subsystem Linux. In this video we will setup WSL and install Ubuntu 18.04, and then install FSL in the Ubuntu environment.
- Věda a technologie
Thank you for the video! Saved me from a lot of headache :)
Thank you for the awesome video.Also, just wanted to say that I was in anaconda environment and was getting error. Exited and followed your instructions.
Thank you very much for this helpful video. I am a beginner in Linux ! How can I deselect Native OpenGL and Disable access control ?
Hi, thanks for your video! I followed all the instructions and everything goes fine until I tried the fsleyes command, it told me that "if wxplat == fwidgets.GTK2: AttributeError: module 'fsleyes_widgets' has no attribute 'GTK2' ", I wonder if you or anyone can help me with the problem? When I run bet and flirt they work fine.
Hi,
thank you for the video. Unfortunately, when I finished the video, in the last step, when i type "fsleyes", it says "fsleyes:command not found".. Could anyone help me?
Hi, I installed Ubuntu and tried the first command on it, but it didn`t work
"Package mesa-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsolated, or is only available from another source
E: Package ´mesa-utils´has no installation candidate"
I dont know what happened
Hello Sir, ''Check that Matlab and FSL are correctly installed, and that FSL can be executed from Matlab''. Can you pls tell me how to do this?
I followed every step but I'm having some trouble:
After downloading FSL on ubuntu it asks me to input my password. Upon doing so it doesn't do anything else. it seems to ignore all comands. I tried to install it again but it just happens all the same. It downloads for about 40mins, asks for the password and then nothing else happens
I have followed the steps but during fal installation after downloading and entering my terminal cursor rotating.
Is this an error?
I've installed FSL on windows 10 via ubuntu/ WSL2. When i click the brain extraction tool and go to input image, the directories are all unfamiliar. Im seeing '/root/image'. I can't find the answer to this anywhere but can someone explain to me how the WSL/ ubuntu directory and file system works on Windows 10? How do I access the directory and add my MRI file into it?
Anyone knows how to install FLS in a virtual box Linux? My main operating system is windows 10 and I have a virtual box with Ubuntu. I cannot make sense from the wiki page so far, starting with whether I should follow the Linux instructions or the windows virtual machine ones.
Does anyone know how to find the fsl bin folders after installing like this?
Dear all, I run the same issues: post installation issues with miniconda, failed to install python environment (stage 2 error), does any one know how to move on ? thanks
I have problem with sharing my data between windows and my VMware virtual machine. It does not find the directory where I stored my data, even though it shows up in my virtual machine. Can anyone help?
Thank you for this video.
When I command < python /mnt/c/Users/myname/Downloads/fslinstaller.py> i failed with this error.
> [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)
What can i do for this?
hi...i am not able to open fsleyes in fsl gui. i spend two days to solve but not getting solution. i have ubuntu 20.04 as windows subsytem...please help me
Does anyone knows how to remove FSL on Windows 10? I believe I install it twice and took many space in C drive. I want to remove redundant FSL. Please teach me how to remove FSL to release the C drive space. Thank you
Thanks for the video sir. But im stuck after the installation while typing fslmaths/fsl it shows this - "You need to set the FSLDIR environment variable to point to the FSL installation directory before you can run anything." CAN ANYONE HELP ME
it could also work on windows 11?
thank you so much, worked perfectly for me!!
Glad it helped!
Life saver! Thanks a bunch.
I installed VcXsrv and got the display problem. It returned as "DISPLAY is not set. Please set your DISPLAY environment variable! "
I don't know why did this happen, but mannually enter "export DISPLAY=:0" get the problem solved.
Some updates for window 10.
sudo apt install python3
alias python='python3' (Set alias )
export display did not work for window 10. Then I tried
export DISPLAY=:0
It worked.
/fslinstaller.py" [FAILED] [Errno -3] Temporary failure in name resolution, please advise on how to address this error.
Thanks for this video!!
Hi. After the "python3 /mnt/c/Users//Downloads/fslinstaller.py" this appear "SyntaxError: Missing parentheses in call to 'print'. Did you mean print(msg)?" I tried editing the script, adding parenthesis on the said line and run it again. It did ask me again the same thing but on the different line that have print function. What can I do? Thanks
Hi, when running the installer script you must use python2. If you don't have python2 installed then be sure to install it first. I would also go ahead and re-download the fslinstaller.py script since you have edited it. (just to be safe). Python2 is only needed for the installer (not for using FSL)
Thank you!! It helps a lot!!😁
Thank you for the video! I probably did something really stupid at one point, I followed to the letter though... but with "fsleyes" it tells me "command not found". But i've also installed Xming and all... Why is it not finding it?
Hey, I think it may be an issue with your path. So basically if you have fsl installed to.... let's say /usr/local/fsl , then you need to set the FSLDIR path and setup path.
-Go to this link: fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/ShellSetup
Try to follow the steps above and see if it works.
If not, which is what happened to me, I had to manually execute each of those commands at my home directory where my .profile and .bashrc files are
You can even automate those commands by creating a shell script and then when running that script, make sure you run it in 'source' mode (i.e. source ./myscript.sh).
xming is not functional and no GUIs open, I would really appreciate more detail in how to get FSL completely installed and running.
The video and the instructions on the wiki page are very different. So this whole thing doesn't make any sense and confuses more than it helps.
FSL has never had a set of clear and nuanced instructions. This is the fifth time I have tried to install over the years and the whole process is a comedy of errors.
were you able to download? the video is so different from the instructions online!
@@deryaadil4344 sorry I gave up. If you need expert advice, subscribe and post a question in the FSL mailing list:
www.jiscmail.ac.uk/cgi-bin/webadmin?A0=FSL
Good luck
Before I found this video I mistakenly selected Windows as the OS to install on the download page instead of Ubuntu. What are the steps I should take to try and fix this problem?
Hi, If you want to instal FSL into the WSL environment then you need to select ubuntu as the OS. You can simply go through the FSL website registration steps again, and make sure you choose ubuntu this time. You should then be taken to a page with a link to download the fslinstaller.py script. Then the video instructions should help you from there.
Hi! I followed the video and when testing fsleyes at the end, ubuntu shows >. Do you know how I can fix this import error? Thanks!
Hi, did you get any errors during the install process? Also, did you perhaps install a server version of Ubuntu (e.g. headless). Could you also briefly list the steps you followed so that we can make sure none of the earlier steps went wrong? Sometimes stepping through the procedure one item at a time can highlight issues.
@@FSLCourse Hi, I followed the video step by step, but downloaded the fslinstaller.py after downloading the Xming app. Initially I didn't realize I hadn't downloaded fslinstaller.py yet, so I couldn't do the step at 5:02 in the video. I thought it was a problem with my Xming so I tried to remove and re-download it twice before realizing it was the fslinstaller.py problem. That's my only deviation from the video. When I just type fsl into my Ubuntu, the output says > so it may be a GUI issue, if that helps. Thanks!
Hello, Thanks so much for this very helpful video! Is there any way to get the latest version of FSL (6.0.4) to work with WSL2, instead of version 3.1.0?
Hi Raphaëlle, did you can solve these problem? I have the same question
@@davidr.ortigozamicolta6465 Hi, I did manage to install FSL 6.0 with WSL2 yes ! Can't quite remember how but I can look into it if you need me to
Hi, I have installed on windows 11. I have even downloaded Xming. However, when I run the fsleyes command, I get the following error Unable to access the X Display, is $DISPLAY set properly? Any ideas?
I have the same problem did you solve it?
Thanks for the awesome video! Probably a stupid question but how do I open a file from the Windows system from within Ubuntu? Or how do it get the files in there?
Found a solution for anyone interested. If you're using Windows 10, you can Shift + right click any folder and select "Open Linux shell here" -> This folder will then be visible from within Ubuntu and FSL.
@@Schaschlik345 OMG!! thank you soo much!!! youre a life savior!!
@@ManojKumar-qg9bw Glad to help!
@@Schaschlik345 Thank you!!!!! I was looking for this
After install, ubuntu shell try to run some after installing tasks and it gave me this error:
CopyFileError: cp: target '/usr/local/fsl/etc/fslinstaller.py' is not a directory
Then, in a new ubuntu shell, I could run fslmaths with the expected output, but when I've tried to run fsl, it gave me this:
Application initialization failed: couldn't connect to display "localhost:0.0"
Error in startup script: couldn't connect to display "localhost:0.0"
while executing
"load /usr/local/fsl/extras/lib/libtk8.4.so Tk"
("package ifneeded" script)
invoked from within
"package require Tk"
invoked from within
"if { [ string match -nocase *wish* $MYSHELL ] } {
package require Tk
# tk_focusFollowsMouse
#bind Button { focus %W ; tk::ButtonEnter ..."
(file "/usr/local/fsl/tcl/fslstart.tcl" line 18)
invoked from within
"source [ file dirname [ info script ] ]/fslstart.tcl"
(file "/usr/local/fsl/tcl/fsl.tcl" line 71)
invoked from within
"source ${FSLDIR}/tcl/${origname}.tcl"
(file "/usr/local/fsl/bin/fsl" line 22)
And I've launched Xming and XLaunch, before running the commands in ubuntu shell.
Can you help with this?
Hi, could you try the updated (provisional) instructions on this page: fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/Windows#WSL_2_Changes_.28_provisional_.29
Xming with WSL has been problematic in recent windows updates.
thank you very much, took forever but very seamless otherwise!
Glad it helped!
I am getting an error when trying to test fsleyes, it keeps saying command not found. Has anyone faced this issue and been able to solve it?
have you managed to solve this?
This video and the tutorial needs to be updated. For example, "python" is no longer an available Linux package. For Windows 10, there is no need to use XLaunch as WSL2 supports GUI on the latest Windows version. For Windows 11, GUI is enabled by default.
once i paste the first line it gives me an error " + CategoryInfo : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
+ FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand"
Hi, sometimes copy and pasting from websites can introduce weird characters. Try to only copy the text within the gray code block area
Hi, thanks a lot for the video, I'm finding it really helpful! But I have a problem. Once I get to the stage where I have to run the download script in Ubuntu via "python /mnt/c/Users//Downloads/fslinstaller.py", I get this response - "No such file or directory". Any idea what went wrong?
Hi, did you replace "WindowsUserName" with your username on the windows side of your computer? Replacing that text will prob be all you need!
@@TaylorHanayik I'm also having this issue and have replaced with my username. Any tips?
@@xJRAS
1. Make sure to right click on the Ubuntu app and click on run as administrator.
2. Make sure your python version in Ubuntu(I guess?) is python 2.X.XX
ex: my version is 2.7.XX
3. If your username (ex: User Name) has space, type like this:
.../User\ Name/...
So if your username is "User Name",
you should run Ubuntu app as administrator, and type:
python2.7 /mnt/c/Users/User\ Name/Downloads/fslinstaller.py
(I tried several hours today, finally installed it successfully!!)
@@user-sw6qm7cp6r Did you have to download the Glxgears? I am having this issue. I did everything you said here but it still gives me the same error!
please help
Hello,
Thank you very much for the video!
I only encountered one problem. When trying to open fsleyes, I receive the message: "Unable to access the X Display, is $DISPLAY set properly?"
Any ideas of how to solve this?
Thank you very much in advance!
Hi, we are currently working on updating the Windows WSL install instructions since Xming seems to be causing issues. fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/Windows#WSL_2_Changes_.28_provisional_.29
@@FSLCourse So after some sweat and tears, I was finally able to install FSL, but I think the problem wasn't in Xming! It's on WSL, the version 2 is bugging so it needs to be manually downgraded to version 1 (how to here: beebom.com/how-run-gui-based-linux-programs-windows-10/). Nonetheless it's indeed critical to deselect Native OpenGL and select Disable access control in the Extra Settings panel.
Hope it helps! :)
@@carolinapicarra4260 Thank you very much for the video FSL Course and Carolina. I got the same problem. So, I downgraded WSL from version 2 to 1, then, display setting code was: DISPLAY=:0; export DISPLAY. The xming is okay. Another vcXsrv was not required for me. This video and this comment from you was a savior for me. I tried for one week, and got to read this comment. Thank you Carolina again.
@@SurenMaharjan Glad I could help! :)
thanks so much because this is very hard!!!
i had some problem after installing fsl in ubuntu: i can't open the program using fsleyes the respond is that fsl command not found
Hi, you may need to close the ubuntu session on your windows computer and then reopen it for the fsl commands to be found correctly. There are additional steps to get FSLeyes working on our wiki now. fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/Windows#WSL_2_Changes_.28_provisional_.29
@@FSLCourse please make another video with WSL2 changes
Hi i am still having an error at this step: python /mnt/c/Users//Downloads/fslinstaller.py
It says no such file or directory. I did change it to my actual user name but still not working
Hi, can you confirm that fslinstaller.py is in the Downloads folder on your windows operating system? If you downloaded it to a different place, then change the path accordingly.
@@FSLCourse I am having the same error and it is in my downloads folder and on the windows operating system. Is this an issue with python or? I am really lost here
thank you so much!
Thank you for the video! I'm a little stuck with the installation. "fsleyes command not found" came up on my terminal so I did the steps; 1. Check to see if a directory called $FSLDIR/fslpython exists. 2. If it does, delete it by running sudo rm -r $FSLDIR/fslpython.
Run sudo $FSLDIR/etc/fslconf/fslpython_install.sh -f $FSLDIR to re-install the missing components. However, when re-installing, stage 1 went to 100% but stage 2 is stuck at 0%. I'm not sure where to go from here!
I have this problem as well. Can anyone help please? Thank you
Same here! Anyone?
Thanks for this great video! I'm getting a weird error ([FAILED] [Errno -2] Name or service not known) when running:
python /mnt/c/Users/tydio/Downloads/fslinstaller.py
Copying the full output from my terminal (Ubuntu 18.04 Bionic, WSL)
--- FSL Installer - Version 3.0.21 ---
[Warning] Some operations of the installer require administative rights,
for example installing into the default folder of /usr/local.
If your account is an 'Administrator' (you have 'sudo' rights)
then you will be prompted for your administrator password
when necessary.
When asked a question, the default answer is given in square brackets.
Hit the Enter key to accept this default answer.
[FAILED] [Errno -2] Name or service not known
If you have any tips, I'd really appreciate it.
Right click on the ubuntu app and click on run as administrator
@@pratikian that does not work
I did everything said in the video but my fslinstallation.py is taking 3-4 hours to run and showing "_/" this symbol for hours and nothing is working, like checking the commands like "bet, flirt, fsleyes" I tried to freshly install the python file but same thing is happening, it is getting downloaded but installing is taking a longer time and after I type in the password it is showing me the above symbol. Please help me, shall I leave it like that for overnight? or do what? my ubuntu version is 20.04 as in 18.04 it was showing WSL not registered or something, and hence my fsl version that i downloaded was 6.0.4.
Need help.
It took me like 12 hours to get this done, but now I am getting an error when i run fsleyes, Matplotlib is building the font cache using fc-list. This may take a moment.
Unable to access the X Display, is $DISPLAY set properly?
What does this mean?
What shall I be doing?
Help!!
Hi, we are currently working on updating the Windows FSL install instructions since Xming seems to be causing issues. The instructions may change some, but there is a provisional update here: fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/Windows#WSL_2_Changes_.28_provisional_.29
@@FSLCourse I have a same problem either. Even if I delete Xming and setup the Vcrx and followed the provisional update, I couldn't able to open FSL in my computer. Do you have further recommendation about this problem?
the very same thing happened to me. Were you able to solve this problem?
I followed your steps and when after the bet command (as well as fsl etc) I get "couldn't connect to display "localhost:0.0" " error. Do you know how to fix this? Thanks
Hi, one of the steps for getting things setup in the WSL environment on windows is this command: echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
did you run that? After doing so, it might help to close out of the ubuntu window and open it up again.
@@FSLCourseAfter doing that command, ubuntu keeps warning "Unable to access the X Display, is $DISPLAY set properly?" and I cannot start fsl.
@@keding2453 Had the same issue and opening Xming solved it for me.
@@FSLCourse Any troubleshooting tips for this issue? I am having the same issue, I have reinstalled and restarted Xming and FSL. "Unable to access the X Display, is $DISPLAY set properly?"
did someone figure this out?
Thank you for this guide. Unfortunatelly, when I try to install FSL i fail with this error
Failed to create FSL Python environment - see /tmp/fslpython5bqQ/fslpython_miniconda_installer.log for details
If i try to move on, launching FSL and commanding FSLeyes, I experience this error:
fsleyes command not found.
Can Anyone help me? Thank
I have exactly the same issue! Unfortunately, I didn't find a solution yet.. Any updates?
Same here, anyone found a solution?
@@fady492001 same here!! any solutions ?? thanks
I used Hyper-V (WSL 2) instead - caviat is you may need windows 10 pro
same to me. :(
when i use following comand to fix the problem, the out put error is
harsimar@DESKTOP-UFAUF29:~$ $FSLDIR/fslpython/bin/conda install -n fslpython -c conda-forge deprecation==1.*
NotWritableError: The current user does not have write permissions to a required path.
path: /home/harsimar/.conda/envs/.conda_envs_dir_test
uid: 1000
gid: 1000
If you feel that permissions on this path are set incorrectly, you can manually
change them by executing
$ sudo chown 1000:1000 /home/harsimar/.conda/envs/.conda_envs_dir_test
In general, it's not advisable to use 'sudo conda'.
Hi, it looks like you do not have the necessary write permissions to that directory. Maybe you have accidentally changed permissions on some files in your home folder? If you can, It might be best to just restart the entire ubuntu + FSL installation process. Otherwise, you could try changing permissions on your home folder, but risk breaking things further if you are unfamiliar with these operations.
Hello, i have downloaded FSL but it appears that it did not install "fsleyes" since it gives an error such as "cmg@Cmg:~$ fsleyes
fsleyes: command not found". Is there a way that i can manually install fsleyes or are there any solutions?
I have the same problem! please let me know if you fix it
@Cem Ege Ozalp, were you able to fix it. I have the same issue
@@judeolufemi8919 @Sumayya Azzony the thing is you have to open "Xming" in order to access to the FSL tools.
@@cemegeozalp197 it's open but that does not work, seems to be an issue "connecting to display properly"
@FSL Course, Dear admin,
please upload another video which solves the issue with fsleyes which most of us faced..... It would be really helpful since many people including me still haven't find a solution
I don't know if you still need help but I struggled with this all day today.
I ended up completely reinstalling from fslinstaller.py, and waiting a very long time for "Stage 2" of the installation to complete. Once I ran it the second time (after reinstalling and waiting for stage 2 to finish), it worked.
Might not work for you but I hope it does!
@@natsm910 Could you help me how i can access file in desktop from ubuntu ?
@@himanshugarg494 I'm guessing you already figured out the xserver thing. If not I can try to help with that too.
Is the program just saying "No such file or directory" or something along those lines?
@@himanshugarg494 If so, I've found that a good way to troubleshoot where the issue is is by typing in the following.
Long story short, Ubuntu stores your Windows files in a command first specified by /mnt.
For me, accessing the desktop would looking like this,
/mnt/c/Users/Nate Hostetler/Desktop
Also for me, Ubuntu failed to recognize my User as a directory. I figured this out be gradually typing more and more into Ubuntu, e.g.,
/mnt
Ubuntu returns: is a directory
/mnt/c
Ubuntu returns: is a directory
/mnt/c/Users
Ubuntu returns: is a directory
/mnt/c/Users/Nate Hostetler
Ubuntu returns: no such file or directory '/mnt/c/Users/Nate'
Now, I knew the error was in my user. To work around this, I stored "fslinstaller.py" in the "Users" folder in my computer.
This way, I didn't have to include my user in the command to Ubuntu. Instead I just had to write,
/mnt/c/Users/fslinstaller.py
Or something like that.
This might not have even been anywhere near what your question was, but it was super frustrating for me so I hope it helps you in some way.
@@natsm910 I have the same problem I checked if the problem was the location but it can find the location. However I'm not able to reinstal the last command: echo"export Display=localhost:0.0 >> ~/.bashrc. Do you have any idea how to solve this?
I followed your steps and when I try fsleyes says "command not found". The rest is OK. What happens here?
I have the same problem!
Hi, can you check to see if you have an "fslpython" folder inside your main FSL directory. The lack of FSLeyes could be indicating that the fslpython install has failed. Were there any error messages at the time of install, or perhaps a line saying that you can see details in a log file?
@@FSLCourse I am a Windows user and don't have previous experience with Ubuntu or Linux. How can I find the FSL directory? I just pressed intro when installing. Regarding the installation question, there was no problem message. Apparently, everything worked (all other commands), except for FSLeyes, which says "command not found" without any log files nor extra info.
@@antoniofdez I have the same issue, no other problems with FSL, only fsleyes. Only error being command not found
@@rebeccaharding7669 are you still trying? I tried many times and just decided to install Ubuntu.
Thank you for nice presentation. when i installed the FSL, every thing worked well except fsleyes. the error was file not found. then i installed fsleyes file as per direction on website fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSLeyes#Install_as_part_of_FSL_.28recommended.29
it shows following error
harsimar@DESKTOP-UFAUF29:~$ fsleyes
Traceback (most recent call last):
File "/home/harsimar/.local/bin/fsleyes", line 7, in
from fsleyes.filtermain import main
File "/home/harsimar/.local/lib/python2.7/site-packages/fsleyes/__init__.py", line 206, in
from fsl.utils.platform import platform as fslplatform
File "/home/harsimar/.local/lib/python2.7/site-packages/fsl/utils/platform.py", line 21, in
import fsl.utils.notifier as notifier
File "/home/harsimar/.local/lib/python2.7/site-packages/fsl/utils/notifier.py", line 20, in
import fsl.utils.idle as idle
File "/home/harsimar/.local/lib/python2.7/site-packages/fsl/utils/idle.py", line 83, in
from collections import abc
ImportError: cannot import name abc
can you guide me how to fix this problem
Hi, in this case, you have tried to install fsleyes into a python 2.7 environment, and this is not supported. You can try these steps again in a python 3.5+ environment. On ubuntu you will need to use the "python3" program from the command line, rather than "python"
@@FSLCourse Hi I have this trouble too and I already have python 3.8 on pc but it doesn't work. I have no idea of what I should do now. could you help me?
Hi, so I have managed to donwload and install FSL.
I followed all the steps but when I close Ubuntu and reopen it to run FSL, I have the following:
tpd22@DESKTOP-B3HJL0V:~$ fsl
DISPLAY is not set. Please set your DISPLAY environment variable!
tpd22@DESKTOP-B3HJL0V:~$ fsleyes
Unable to access the X Display, is $DISPLAY set properly?
Can someone help please?
Hello, I followed the updated instructions from the website and also watched this video, but I am unable to run fsleyes command and get this error: "mwaniak@DESKTOP-43L11BF:~$ fsleyes
Traceback (most recent call last):
File "/home/mwaniak/fsl/bin/fsleyes", line 6, in
from fsleyes.filtermain import main
File "/home/mwaniak/fsl/lib/python3.11/site-packages/fsleyes/__init__.py", line 374, in
from fsleyes.main import embed, shutdown # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mwaniak/fsl/lib/python3.11/site-packages/fsleyes/main.py", line 35, in
import wx
File "/home/mwaniak/fsl/lib/python3.11/site-packages/wx/__init__.py", line 17, in
from wx.core import *
File "/home/mwaniak/fsl/lib/python3.11/site-packages/wx/core.py", line 12, in
from ._core import *
ImportError: libXxf86vm.so.1: cannot open shared object file: No such file or directory". I can run fsl command which opens the program though. Do you know what could be causing an error?