.. toctree:: :maxdepth: 1
Find the name of your home directory
On windows:
start a cmd shell by typing "cmd" in the windows search bar and executing the dos command prompt
Note the location that is listed when you type
echo %userprofile%
in the command window
On macs:
Start a terminal by typing terminal in spotlight
Note the location that is listed when you type
echo $HOME
Install Miniconda Python version 3.6 from https://conda.io/miniconda.html into a a folder called mini36 in your home directory. When prompted, choose to install for just yourself, but make miniconda python the default python
To see if your installation is working, start a terminal and type
where python (on windows)
or
which python (on macs)
You should see that mini36 python is the version that is found on your path
Install the git version control package (which we will learn more about later). To do this, type
conda install git
at a prompt and answer yes to permit the install
Clone the course software into a directory of your choosing. Create a folder somewhere under your home directory and cd into that folder. Then type the following at the prompt:
git clone https://github.com/phaustin/numeric.git
cd into the numeric folder and install the course software by typing (note single minus sign in front of the e):
pip install -e .
cd into the numeric/utilities folder and install the required python packages by typing (note two minus signs in front of the file flag):
conda install --file class_specs.txt
If the packages have installed correctly then typing
jupyter notebook
at a prompt should launch jupyter.
If you are new to python, I would recommend you go over the following ebook in detail:
Jake Vanderplas' Whirlwind tour of Python is available both as a set of notebooks which you can clone from github or as a free ebook: http://www.oreilly.com/programming/free/a-whirlwind-tour-of-python.csp
to get the notebooks do:
We will be referencing chapters from:
A Springer ebook from the UBC library: Numerical Python
with code on github:
git clone https://github.com/jrjohansson/numerical-python-book-code
Two other texts that are available as a set of notebooks you can clone with git:
Our version of David Pine's Introduction to Python: http://clouds.eos.ubc.ca/~phil/djpine_python/
My favorite O'Reilly book is:
Some other resources:
- If you know Matlab, there is Numpy for Maltab users
- Here is a python translation by Don MacMillen of Chapter 1 of his matlab guide
- Python data structure cheat sheet
- Numpy beginners guide
- Learning Ipython
- The official Python tutorial
- Numpy cookbook
- A general computing introduction: How to think like a computer scientist with an interactive version
- Think Stats
- Think Bayes