RAVE:Install prerequisites

From OpenWetWare
Jump to navigationJump to search
RAVE logo R Analysis and Visualization of iEEG

RAVE


RAVE runs on Mac, Windows or Linux. For best performance, a 4-core CPU (e.g. Intel i5 or better) with at least 64GB RAM (at least 8 GB per core) is recommended. RAVE displays results using a web browser, and is developed with Google Chrome. Other browsers will run with reduced functionality (e.g. shaders will not render brain slices). Mac and UNIX offers better multicore tools than Windows, so multithreaded operation will be better on these platforms.

Prerequisites for MacOS

1. Install the package manager "brew". Open "terminal" (in the /Applications folder). Copy the command line shown on the website into a terminal window. It will prompt for the administrator password. Press "RETURN" to install all packages.

 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

==> For Apple M1 chip users, Please run the following script after installing brew

 echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
 echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.profile
 echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile

2. Install the latest version of the R language. Find the latest package file, click to download, then open and install.

==> For Apple M1 chip users, please install ARM version, e.g. R-X.X.X-arm64.pkg)

3. Install RStudio Desktop Open "terminal" (in the /Applications folder). Copy the command line below and return.

 brew install --cask rstudio

The RStudio will be installed at /Applications folder. We recommend that you open, and right-click on the RStudio icon and select "Options"/"Keep in Dock". This will make it easier to launch RStudio and RAVE.

4 Install the hdf5 (high-performance file system), fftw (fast-fourier transform library), pkg-config (package configuration toolbox). Enter this command into the terminal window:

 brew install hdf5 fftw pkg-config
    

5. Return to full installation guide.


Troubleshooting: When RStudio is first launched, you may receive this message

 Warning: macOS is reporting that you have not yet agreed to the Xcode license. This can occur if Xcode has been updated or reinstalled (e.g. as part of a macOS update). Some features (e.g. Git / SVN) may be disabled.

To make this error go away, open the "Terminal" app in the Applications folder, enter

 sudo xcodebuild -license accept

For password, type in the password of an account with Administrator privileges. Then restart RStudio. A helpful article in case of XCode installation errors.

If the XCode download from the RStudio install in step 2 fails, install the command line tools manually. First, download XCode. Click "GET" (if instead you see "OPEN", then Xcode is already installed.) Open the "Terminal" app in the Applications folder, enter

 xcode-select --install

Click "yes" to proceed with installing the command-line tools. The message "xcode-select: error: command line tools are already installed" means that you can proceed.

Prerequisites for Windows

These instructions are for Windows 10 with "bash" enabled. You will be asked many questions by the installers; the default response is fine for all of them.

  1. Install the latest version of the R language
  2. Install the latest version of RTools. The version of RTools must match your version of R. RTools contains compilers used to compile routines for faster execution.
  3. Install the free version of RStudio Desktop
  4. Return to full installation guide.

Prerequisites for Ubuntu

To install R, please go to https://cran.r-project.org/ and read installation guide for Linux system. The following guide is for Ubuntu (x86_64) system.

1. Add R-Cran repository to your app list:

Open terminal (if you don't know how, look at your sidebar in ubuntu, `search your computer` enter "terminal", and open it), type the following code:

 # update indices
 sudo apt update -qq
 # install two helper packages we need
 sudo apt install --no-install-recommends software-properties-common dirmngr
 # import the signing key (by Michael Rutter) for these repo
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
 # add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
 sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
2. Install R

Copy the following command line by line into your terminal and run

 sudo apt-get install r-base r-base-dev
3. Install compiling tools and system dependencies

After installing R, copy the following command to your terminal and run:

 sudo apt-get install build-essential file git libsodium-dev libffi-dev \
   libbz2-dev libpcre2-dev libcairo2-dev libcurl4-openssl-dev libfftw3-dev \
   libfreetype6-dev libfribidi-dev libgit2-dev libhdf5-dev libharfbuzz-dev \
   libjpeg-dev libpng-dev libssl-dev libssh2-1-dev libtiff5-dev libv8-dev \
   libxml2-dev psmisc procps sudo wget zlib1g-dev

The packages `libv8-dev` is for `V8` package to enable JavaScript. `libxml2-dev` is for `xml2`. `libfftw3-dev` `libtiff5-dev` are necessary for fast-fourier transformations and `libhdf5-dev` is for reading and writing data in open data format `HDF5`. All the other packages are necessary for `devtools` (compilers)


4. (Optional) Install the free version of RStudio Desktop here:

Go to https://www.rstudio.com/products/rstudio/download/#download and download one with keywords "Ubuntu 16.04+/Debian 9+ (64-bit)", move the downloaded file to your **desktop**, rename it "rstudio.deb".

Open terminal, type the following command in your terminal

 cd ~/Desktop
 sudo dpkg -i ./rstudio.deb 

and `RStudio` should be in your application list. Again, if you don't know where it is, look at your sidebar in ubuntu, click **search your computer** and enter "RStudio". See [1] for more help.

Return to full installation guide.