Skip to content

Windows installation full guide

Natalia Rozengard edited this page Oct 25, 2018 · 28 revisions

Installation steps:

  • Download and install the latest stable Blender (2.7pb).
  • Download and install Git.
  • Download and install Anaconda python 3.6.
    If you prefer to install only the necessary libraries, you can take a look here.
  • Create a folder named "mmvt_root".
  • Open the git application - Git CMD.
  • From the command line, go to the mmvt_root folder:
    1. Copy the folder path.
      Example: c:\Users\Jhon\Desktop\mmvt_root
    2. In the Git CMD terminal type the letters: cd hit space and paste the folders path.
      Example: cd c:\Users\Jhon\Desktop\mmvt_root
  • Clone the MMVT code in the new line opened in the Git CMD.
    Type: git clone https://github.com/pelednoam/mmvt.git.
  • A folder named "mmvt" will be created under the mmvt_root folder. Rename it to mmvt_code folder.
  • Open the "Anaconda Prompt" application. Go to the mmvt_code folder by using the cd command.
    Example: C:\Users\Jhon\mmvt_root\mmvt_code
  • Run the mmvt setup.
    Type: python -m src.setup.
  • Go to the Windows menu and search for 'cmd'. Right click on the icon and choose 'run as administrator' (same as step one in the message that appears when the setup ends).

  • When the setup ends a message with directions will appear in the terminal. Please follow the instructions to complete the setup.
    Here is an example of such a message:

    Sorry, automatically installing external python libs in python will be implemented in the future. Meanwhile, you can do the following:
    1) Open a terminal window as administrator: Right click on the "Command Prompt" shortcut from the start menu and choose "Run as administrator"
    2) Change the directory to "C:\Program Files\Blender Foundation\Blender\2.79\python".
    3) Run "bin\python.exe C:\Users\Jhon\Desktop\mmvt\mmvt_root\mmvt_code\resources\get-pip.py"
    4) Run "Scripts\pip install matplotlib zmq pizco scipy mne joblib tqdm nibabel pdfkit decorator Pillow scikit-learn gitpython"

The setup script steps:

  • Installation of all the necessary python libraries.
  • If the script won't find the Blender installation, it'll ask you to locate it.
  • In default, the script will create all its folders under the mmvt_root folder, unless you set the -d flag to 0. If so, it will ask you where to create the following folders (in brackets the folder's default name):
    • mmvt ("mmvt_blend"): The folder where you all the MMVT files are going to be stored. The blender files (*.blend) will be placed in this folder. For each subject, a folder will be created and the output of the preprocessing scripts will be stored in that folder.
    • meg ("meg") / eeg ("eeg") / fMRI ("fMRI") / electrodes ("electrodes"): Where you are going to store the different data files. For the modalities you aren't going to use, just press cancel.

After running the setup script

  • Create a script for running Blender from the terminal. You can find such a script in the mmvt_code/misc/mmvt.bat.
  • Try to run it. If it works, just create a shortcut to this file. Place the shortcut on your Desktop, and change the icon to the icon located in mmvt_code/misc/bleder.ico.
  • If the bat file doesn't work, you'll need to change the location of blender.exe in the bat file. Don't change it in place. First, copy it to a different folder which isn't under mmvt_code folder, and only then creates the shortcut.

You can find more information about how to run Blender from the terminal here.

How to create the links manually

In case you don't want to use the gui for selecting your folders, before running the setup, run this command: python -m src.setup -f create_links_csv That will create the skeleton for the links.csv file in the links folder. Edit it manually, and run the setup.