The quickest method for trying the Jupyter Notebook is by going to http://try.jupyter.org . This connects to a notebook out in the internet. The files do not exist on your computer, they’re on some random computer you don’t have control of. If you close the window, the files go away. It is meant as a temporary space to try out the notebook for yourself. If you click “New” at the upper-right and select “Python 2” it will create a new notebook. When you’re done, you can click File-> Download As -> IPython Notebook (.ipynb) to save it to your computer.

To actually install Python on your own computer, follow the instructions below. This is not the only one, but it’s the easiest one that I have found.

  1. Install the Anaconda Python Distribution
    • Which one? 2.7 or 3.5? For now, do 2.7.
    • Windows: 64 bit or 32 bit? 64 bit (unless you try to install and it says it can’t)
  2. Open Jupyter Notebook
    • Simple, but rigid method: 
      • Windows: There will be a folder called “Anaconda2” under the start menu. Inside of that will be a shortcut called “Jupyter Notebook”
      • Mac: It should create a shortcut on your desktop called “Launcher”. Open that, and inside will be a shortcut to the Jupyter Notebook
      • Jupyter Notebook will open in your home folder. (C:\Users\<username> on Windows, /Users/<username> on Mac). You will have to save your notebook files there.
    • Slightly harder, but more flexible method:
      • Windows
        1.  Open Windows PowerShell (click on the Start Menu and search for “PowerShell”)
        2. In PowerShell, type “cd ” (without the quotes)
        3. Type the folder where your .ipynb files live (or where you want to create them). If you’re connected to the network drive, it would be R:\Psy407_9\Student_Data\<yourduckid>, hit ENTER
          • Hint: if you start typing the path, you can hit the TAB key, and it will finish typing it for you!
        4. Type “jupyter notebook” (without the quotes) and hit ENTER
      • Mac
        1. Open the Terminal (click on the magnifying glass at the upper-right, search for “Terminal”, OR open Finder and go to Applications -> Utilities -> Terminal
        2. In the terminal type “cd ” (without the quotes)
        3. Type the folder where your .ipynb files to live. If you’re connected to the class drive, it would be: /Volumes/Psy407_9/Student_Data/<yourduckid>, hit ENTER
          • Hint: if you start typing the path, you can hit the TAB key, and it will finish typing it for you!
        4. Type “jupyter notebook” (without the quotes) and hit ENTER
  3.  Create a new notebook
    • From the home page, click “New” at the upper-right, and select “Python 2”
  4. Install packages
    • Anaconda comes with many useful packages for Python that allow it to do other stuff. BUT, it doesn’t come with everything. You will have to install some of the packages yourself (this is already done for you in class)
    • One of the packages is called “nibabel” for dealing with MRI data (http://nipy.org/nibabel/)
    • To install Python packages, we use a command-line tool called “pip”. Here’s how you use it:
      • Windows: Open PowerShell
      • Mac: Open Terminal
      • type “pip install nibabel” (without the quotes) and hit ENTER
      • It will display all kinds of fancy stuff on the screen. You can ignore most of it. Wait until it says “nibabel installed successfully”
    • After you install it, in your notebook, try to run this bit of code: “import nibabel” (without the quotes)
      • If you didn’t get an error, then it worked!