A practical guide to a grab bag of data science techniques with a bias towards medical data.
A handy dandy Python (+ other stuff) universe can be at your fingertips thanks to the folks at Continuum Analytics. To get started, go to their download page and install the Anaconda software distribution (the Python 3 version),
You can use either the graphical installer or the command line installer (I recommend the command line installer). Clicking on the command line installer link will begin downloading a file named something like Anaconda3-4.2.0-MacOSX-x86_64.sh
. In your terminal, navigate to where that file lives and run it using the following command,
bash Anaconda3-4.2.0-MacOSX-x86_64.sh
When the file is run, you will be asked to accept the license agreement and to choose an installation location (the default is your home directory and is fine). Once you select an install location, you will see package names scroll by as they are installed. As the final step, the installer will ask you,
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /Users/galtay/.bash_profile ? [yes|no]
[yes] >>>
Say yes to this. It will append something like,
# added by Anaconda3 4.2.0 installer
export PATH="/Users/galtay/anaconda3/bin:$PATH"
to your .bash_profile
file and it will advise you that this change will not become active until you open another terminal (which you should do). Even if you don't use the bash shell you can copy the export
command into the appropriate startup file (e.g. .zshrc for zsh).
When you are done, you should have a directory called anaconda3
in your home directory. This is an isolated little nugget of computing power. You may have other Python version managing tools on your system (e.g. pyenv). The above command will override those tools. If you prefer to not use the Anaconda distribution at some later time, you can comment out the export
line from your startup script (i.e. .bash_profile
) and open a new terminal. If you ever want to totally remove the distribution, simply delete this directory anaconda3
.