In order to be able to work on your code outside of the lab, you might want to have iPython and git installed on your personal machine. These instructions will help you accomplish that.
At a minimum, you need iPython and Git, but it will help if you have a text editor that is designed to work with code, so we suggest Notepad++. All of these programs are free and open source. When you download the Anaconda installer from Continuum Analytics, they will ask for an email address but will not spam you unless you want to receive their updates.
Not much to say for Notepad++ except install this one first so you know how to configure Git to use it. You can select all of the defaults for it during the wizard process.
msysgit's Git for Windows provides a bash emulation used to run Git from the command line. The bash emulation behaves just like the "git" command in Linux/UNIX/MacOSX environments.
Note: To run git commands through the Windows cmd
prompt, be sure to check the option during the install that allows running git commands from the cmd
prompt. (In the Start Menu, search for cmd
and you will see an icon for it.)
Also, make sure that the check box for Windows style checkouts but UNIX style commits is checked, to deal with the line break differences between windows and UNIX text files.
Once you have it installed, you will need to configure Git to use Notepad++ as your editor. Pay attention to where the installer put Notepadd++. In some cases it will be at C:/Program Files/Notepad++
and in others it will be at C:/Program Files (x86)/Notepad++
. Enter these commands at the cmd
prompt:
$ git config --global user.name "YOUR NAME"
$ git config --global user.email "YOUR EMAIL"
Then, depending on where Notepad++ is installed, run one of the following:
$ git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession -noPlugin -notabbar"
$ git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession -noPlugin -notabbar"
Once you have it all set up, clone your git repository locally by opening the gitbash command prompt and typing:
$ git clone https://github.com/<username>/<repo>.git
replacing <username>
and <repo>
with your username and repo name.
You should get the Anaconda installer 1.9.2 from Continuum Analytics. We have to make sure that the one we download has the most up to date iPython in it.
After you run the installation wizard, open up a cmd
window and check which version of ipython you have by typing:
$ ipython --version
If it does not say 2.0.0
, we need to update it with the following commands:
$ conda update conda
$ conda update ipython
After that, the version command should report 2.0.0.
To use the ipythonblocks module we need to install it. It will also be useful to install the mpld3 module so you can display 3D graphics in the notebook. At the cmd
prompt type:
$ pip install ipythonblocks
$ pip install mpld3
Now you should be all set! Start the notebook server in the cmd
window with the command:
$ ipython notebook
For the Mac, you need the Anaconda program and Git. The exact method of installation depends on the version of the operating system you are running. You can check which version you are running by selecting the apple in the top left corner and choosing ``About This Mac''.
After the installation is complete, open a Terminal window and set up your bash environment to use the ipython notebook:
nano .bash_profile
Put into this file the following lines to set up your environment:
#Script for setting up ipython
alias ipynb='ipython notebook'
export PATH="/Applications/Anaconda/bin:$PATH"
After you have saved it, you can close the Terminal and start a new one or source the file with:
$ source .bash_profile
To use the ipythonblocks module we need to install it. You should be able to open the Terminal and enter the following:
$ pip install ipythonblocks
$ pip install mpld3
Once you have it all set up, clone your git repository locally by opening a terminal window and typing:
$ git clone https://github.com/<username>/<repo>.git
replacing <username>
and <repo>
with your username and repo name.
If after installing git and trying to run a command, such as git clone ...
, if you get a variation on the following output:
Illegal instruction 4
You will need to download an earlier version of the git installer, such as 1.7.12.3 from the http://code.google.com/p/git-osx-installer.
Now cd
into the repository directory and source your configuration script for git global settings:
$ cd <repo>
$ source ConfigureGit.sh
Now start the notebook server in the Terminal window with the alias we created:
$ cd
$ ipynb