Differences between revisions 3 and 20 (spanning 17 versions)
Revision 3 as of 15:29:39 06-09-2012
Size: 4113
Editor: FslAdmin
Comment:
Revision 20 as of 11:05:41 04-08-2023
Size: 3723
Editor: PaulMcCarthy
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
The `fslinstaller.py` script carries out the installation of FSL, configuring your environment to enable you to run FSL from your terminals. The `fslinstaller.py` script carries out the installation of FSL, configuring your environment to enable you to run FSL from a terminal window (e.g. (`/Applications/Utilities/Terminal.app` on macOS). The `fslinstaller,py` source code can be viewed [[https://git.fmrib.ox.ac.uk/fsl/conda/installer|here]].
Line 4: Line 4:
if you use Mathworks' MATLAB it will configure your `startup.m` file to allow you to use the FSL MATLAB functions and on OS X platforms it will also install FSLView into `/Applications`. = Running the installer (on macOS or Linux) =
Line 6: Line 6:
= Running the installer (on Mac or Linux) =
T
he installer runs from within a terminal session, so you need to open a terminal:
The installer requires access to the internet to be able to download the FSL software appropriate for your platform and runs from within a terminal session, so you need to open a terminal:
Line 9: Line 8:
 * Linux (Centos)
  . The Terminal application can be found in `Applications > System Tools > Terminal` menu
 * Mac
 * Linux (Centos 7)
  . The Terminal application can be found in `Applications > Utilities > Terminal` menu
 * macOS
Line 14: Line 13:
In the terminal change to the folder containing the downloaded file and run it (for example if you downloaded to your `Downloads` folder): In the terminal change to the folder containing the `fslinstaller.py` file and run it with python; assuming that you wish to install into `~/fsl/` (the default) then just press the Return key when the installer asks where to install to. For example if you downloaded to your `Downloads` folder:
Line 20: Line 19:
The installer requires access to the internet to be able to download the FSL software appropriate for your platform. Assuming that you wish to install into `/usr/local` (the default) then just press the Return key when the installer asks where to install to. <<Anchor(python_name)>>
{{{#!wiki note
Some systems do not have a command called `python`, and will print errors like `python: command not found`. If this happens try calling `python3 fslinstaller.py` or `python2 fslinstaller.py`.
Line 22: Line 23:
{{{#!wiki warning
'''Administrative privileges may be required'''
Some versions of macOS do not have Python installed by default - if you do not have any Python command available, you can download an installer from https://www.python.org. Alternately, Python will be installed as part of Xcode, which you can install by running `sudo xcode-select --install`.
Line 25: Line 25:
Installation into certain folders on your computer (eg the default, `/usr/local`) may require administrative privileges. If this is the case, the installer will attempt to gain these privileges through the use of the `sudo` command, which will require you to enter your password for verification. If you don't have any rights to use `sudo` (an administration account on OS X) then the installer will fail and will need to be run as the `root` user. Should you install as `root` see the [[FslInstaller/ShellConfigure|configuring your account for FSL]] section for details on how to use the installer to setup your user account for FSL. If you experience SSL certificate errors on macOS, try running the installer with `/usr/bin/python fslinstaller.py` or `/usr/bin/python3 fslinstaller.py`. If you have installed Python separately from https://www.python.org, make sure you have run the ''Install certificates'' script, as described [[https://bugs.python.org/issue43404#msg388144|here]].
}}}
 
Once the install completes Linux users should log out (`System (top right icon) > Log out`) and log back in to complete the FSL setup. If you are accessing the Linux computer via a remote SSH session then close the SSH session and re-login.
Apple macOS users should open a new terminal window to begin using FSL.

if you use Mathworks' MATLAB it will configure your `startup.m` file to allow you to use the FSL MATLAB functions.

{{{#!wiki note
'''Installing FSL into a different location'''

By default, FSL is installed into your user account home directory (at `~/fsl/`), and so does not require administrative privileges. If you wish to install FSL to a different location (e.g. `/usr/local/fsl/`), or are installing FSL on a multi-user system, you may need to enter your administrator password before the installation can proceed. You can run the `fslinstaller.py` script as described above - the script will prompt you for your password when necessary.

If you do not have permission to use `sudo` then the installer will fail and you will need to either install into a folder belonging to your user or to run the installer as the `root` user. Should you install as `root`, see the [[FslInstallation/ShellSetup|configuring your account for FSL]] section for details on how to setup your user account for FSL.
Line 28: Line 41:
Once the install completes Linux users should log out (`System > Log out`) and log back in to complete the FSL setup. If you are accessing the Linux computer via a remote SSH session then close the SSH session and re-login.
Apple OS X users should open a new terminal window to begin using FSL.
Line 31: Line 42:
== Installing as root user on Linux ==
If you need to install as the `root` user, you can do this using these commands (again assuming you downloaded to the your Desktop folder):
{{{#!highlight bash numbers=disable
cd ~/Desktop
su -c "python fslinstaller.py"
}}}
and entering the `root` account password.
You should now configure your user account to enable FSL using the instructions in the following section.
== Advanced Options ==
Line 40: Line 44:
For more information on controlling the installer, run it with the `-h` option - there are options for downloading the install files without installation (for example for installing on multiple computers) and specifying the installation location. The installer has some advanced options which, amongst other things, allows you to:
 * customise the FSL installation location.
 * automate the FSL installation - this is useful if you would like to call the installer from an automated script.
Line 42: Line 48:
== Downloading the install file without installing the software ==
If you have to install FSL on many computers, or perhaps on a machine that doesn't have access to the internet then you can use the installer to download the FSL distribution for later use. To do this, run the installer with the `-o` option:
{{{#!highlight bash numbers=disable
python fslinstaller.py -o
}}}
This will download the install package to the current folder and print the expected MD5 checksum for this file to the screen.
To install this downloaded file, use the `-f` and `-C` options, eg:
{{{#!highlight bash numbers=disable
python fslinstaller.py -f fsl-centos6_54.tar.gz -C `MD5sum`
}}}
replacing `MD5sum` with the hexadecimal number printed when you downloaded the file.

== Scripting installation ==
If your computers have access to the internet then you can automate the installation process using the `-q` and `-d` options to prevent questions being asked and to specify the install location respectively.
Where they cannot access our download site then you can download the install file as above and then use the `-q`, `-d`, `-f` and `-C` options with appropriate values to fully automate the install. For more details run the installer with the `-h` option.
Type `python fslinstaller.py -h` for a list of all available options.

FSL Install Script

The fslinstaller.py script carries out the installation of FSL, configuring your environment to enable you to run FSL from a terminal window (e.g. (/Applications/Utilities/Terminal.app on macOS). The fslinstaller,py source code can be viewed here.

Running the installer (on macOS or Linux)

The installer requires access to the internet to be able to download the FSL software appropriate for your platform and runs from within a terminal session, so you need to open a terminal:

  • Linux (Centos 7)
    • The Terminal application can be found in Applications > Utilities > Terminal menu

  • macOS
    • The Terminal application can be found in /Applications/Utilities

In the terminal change to the folder containing the fslinstaller.py file and run it with python; assuming that you wish to install into ~/fsl/ (the default) then just press the Return key when the installer asks where to install to. For example if you downloaded to your Downloads folder:

cd ~/Downloads
python fslinstaller.py

Some systems do not have a command called python, and will print errors like python: command not found. If this happens try calling python3 fslinstaller.py or python2 fslinstaller.py.

Some versions of macOS do not have Python installed by default - if you do not have any Python command available, you can download an installer from https://www.python.org. Alternately, Python will be installed as part of Xcode, which you can install by running sudo xcode-select --install.

If you experience SSL certificate errors on macOS, try running the installer with /usr/bin/python fslinstaller.py or /usr/bin/python3 fslinstaller.py. If you have installed Python separately from https://www.python.org, make sure you have run the Install certificates script, as described here.

Once the install completes Linux users should log out (System (top right icon) > Log out) and log back in to complete the FSL setup. If you are accessing the Linux computer via a remote SSH session then close the SSH session and re-login. Apple macOS users should open a new terminal window to begin using FSL.

if you use Mathworks' MATLAB it will configure your startup.m file to allow you to use the FSL MATLAB functions.

Installing FSL into a different location

By default, FSL is installed into your user account home directory (at ~/fsl/), and so does not require administrative privileges. If you wish to install FSL to a different location (e.g. /usr/local/fsl/), or are installing FSL on a multi-user system, you may need to enter your administrator password before the installation can proceed. You can run the fslinstaller.py script as described above - the script will prompt you for your password when necessary.

If you do not have permission to use sudo then the installer will fail and you will need to either install into a folder belonging to your user or to run the installer as the root user. Should you install as root, see the configuring your account for FSL section for details on how to setup your user account for FSL.

Advanced Options

The installer has some advanced options which, amongst other things, allows you to:

  • customise the FSL installation location.
  • automate the FSL installation - this is useful if you would like to call the installer from an automated script.

Type python fslinstaller.py -h for a list of all available options.

 

FslInstallation/FslInstaller (last edited 11:05:41 04-08-2023 by PaulMcCarthy)