|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "metadata": {}, |
| 6 | + "source": [ |
| 7 | + "# Student installs\n", |
| 8 | + "\n", |
| 9 | + "**If you already have conda or anaconda installed, skip to `Git install` below**\n", |
| 10 | + "\n", |
| 11 | + "\n", |
| 12 | + "\n", |
| 13 | + "## For MacOS new installs\n", |
| 14 | + "\n", |
| 15 | + "\n", |
| 16 | + "1. Download miniconda from https://docs.conda.io/en/latest/miniconda.html -- choose the correct `Miniconda3 MacOSX 64-bit pkg` file for your Mac (Intel chip or new M1/M2 Silicon) from the menu and run it, agreeing to the licences and accepting all defaults. You should install for \"just me\"\n", |
| 17 | + "\n", |
| 18 | + "2. To test your installation, open a fresh terminal window and at the prompt type `which conda` (unless you are using zsh. In that case use `whence -p conda`). You should see something resembling the following output, with your username instead of `phil`:\n", |
| 19 | + "\n", |
| 20 | + "```\n", |
| 21 | + "% which conda\n", |
| 22 | + "/Users/phil/opt/miniconda3/bin/conda\n", |
| 23 | + "```\n", |
| 24 | + "\n", |
| 25 | + "## For Windows new installs\n", |
| 26 | + "\n", |
| 27 | + "1. Download miniconda from https://docs.conda.io/en/latest/miniconda.html -- choose the `Miniconda3 Windows 64-bit`. download from the menu and run it, agreeing to the licences and accepting all defaults.\n", |
| 28 | + "\n", |
| 29 | + "The installer should suggest installing in a path that looks like:\n", |
| 30 | + "\n", |
| 31 | + "```\n", |
| 32 | + "C:\\Users\\phil\\Miniconda3\n", |
| 33 | + "```\n", |
| 34 | + "\n", |
| 35 | + "2. Once the install completes hit the windows key and start typing `anaconda`. You should see a shortcut that looks like:\n", |
| 36 | + "\n", |
| 37 | + "```\n", |
| 38 | + "Anaconda Powershell Prompt\n", |
| 39 | + "(Miniconda3)\n", |
| 40 | + "```\n", |
| 41 | + "\n", |
| 42 | + "**Note that Windows comes with two different terminals `cmd` (old) and `powershell` (new). Always select the powershell version of the anaconda terminal**\n", |
| 43 | + "\n", |
| 44 | + "3. Select the short cut. If the install was successful you should see something like:\n", |
| 45 | + "\n", |
| 46 | + "```\n", |
| 47 | + "(base) (Miniconda3):Users/phil>\n", |
| 48 | + "```\n", |
| 49 | + "with your username substituted for phil.\n", |
| 50 | + "\n", |
| 51 | + "Some useful troubleshooting websites if you have issues getting conda installed on windows: \n", |
| 52 | + "https://stackoverflow.com/questions/54501167/anaconda-and-git-bash-in-windows-conda-command-not-found\n", |
| 53 | + "https://stackoverflow.com/questions/44597662/conda-command-is-not-recognized-on-windows-10\n", |
| 54 | + "\n", |
| 55 | + "## Git install\n", |
| 56 | + "\n", |
| 57 | + "Inside your powershell or MacOs terminal, install git using conda:\n", |
| 58 | + "\n", |
| 59 | + "```\n", |
| 60 | + "conda install git\n", |
| 61 | + "```\n", |
| 62 | + "\n", |
| 63 | + "and then set it up\n", |
| 64 | + "\n", |
| 65 | + "```\n", |
| 66 | + "git config --global user.name \"Phil\"\n", |
| 67 | + "git config --global user.email phil@example.com\n", |
| 68 | + "```\n", |
| 69 | + "\n", |
| 70 | + "## Github account\n", |
| 71 | + "\n", |
| 72 | + "To use the course materials and to work collaboratively for the project, you will need a github account. Sign up for a free account at https://github.com if you don't already have one - you will need to use the same address you configured git for above. \n", |
| 73 | + "\n", |
| 74 | + "Once you have your github account, you will need to set up a secure way to connect. If you think you might use github a lot, we recommend setting up an ssh connection - this is a longer set-up process, but then quicker each time you want to connect to git. Follow the instructions here: \n", |
| 75 | + "\n", |
| 76 | + "https://docs.github.com/en/authentication/connecting-to-github-with-ssh\n", |
| 77 | + "\n", |
| 78 | + "A quicker set-up is to create a Personal Access Token. Follow the instructions here:\n", |
| 79 | + "https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic\n", |
| 80 | + "\n", |
| 81 | + "Once you have a personal access token, you can enter it instead of your password when performing Git operations over HTTPS (see https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#using-a-personal-access-token-on-the-command-line). \n", |
| 82 | + "\n", |
| 83 | + "## Fork the course repository into your github account\n", |
| 84 | + "\n", |
| 85 | + "Now go to the course website at https://github.com/rhwhite/numeric_2024 and fork the repository. The 'fork' button is on the upper right. This creates a 'fork' or copy of the current status of the repository in your account. \n", |
| 86 | + "\n", |
| 87 | + "You now have your own fork of the course repository and should be taken to that page. Its name will be YourGitHubId/numeric_2024\n", |
| 88 | + "\n", |
| 89 | + "## Setting up the course repository\n", |
| 90 | + "\n", |
| 91 | + "In the terminal, change directories to your home directory (called `~` for short) and make a new directory\n", |
| 92 | + "called `repos` to hold the course notebook repository. Change into `repos` and clone the course (do change YourGitHubId to your actual git hub id):\n", |
| 93 | + "\n", |
| 94 | + "```\n", |
| 95 | + "cd ~\n", |
| 96 | + "mkdir repos\n", |
| 97 | + "cd repos\n", |
| 98 | + "git clone https://github.com/YourGitHubId/numeric_2024.git\n", |
| 99 | + "```\n", |
| 100 | + "\n", |
| 101 | + "## Creating the course environment\n", |
| 102 | + "\n", |
| 103 | + "In the terminal, execute the following commands:\n", |
| 104 | + "\n", |
| 105 | + "```\n", |
| 106 | + "cd numeric_2024\n", |
| 107 | + "conda env create -f envs/environment.yaml\n", |
| 108 | + "conda activate numeric_2024\n", |
| 109 | + "```\n", |
| 110 | + "\n", |
| 111 | + "## Opening the notebook folder and working with lab 1\n", |
| 112 | + "\n", |
| 113 | + "To make it possible to pull down changes to the repository (for example, as I write this section only lab1 and lab2 are available) you need to work in a copy of the notebook. So always copy the notebook to a new name. See below an example for lab1. I suggest you use your name rather than phil!\n", |
| 114 | + "\n", |
| 115 | + "```\n", |
| 116 | + "cd ~/repos/numeric_2024/notebooks\n", |
| 117 | + "cp lab1/01-lab1.ipynb lab1/phil-lab1.ipynb\n", |
| 118 | + "jupyter lab\n", |
| 119 | + "```\n" |
| 120 | + ] |
| 121 | + }, |
| 122 | + { |
| 123 | + "cell_type": "code", |
| 124 | + "execution_count": null, |
| 125 | + "metadata": {}, |
| 126 | + "outputs": [], |
| 127 | + "source": [] |
| 128 | + } |
| 129 | + ], |
| 130 | + "metadata": { |
| 131 | + "jupytext": { |
| 132 | + "cell_metadata_filter": "all", |
| 133 | + "formats": "ipynb,py:percent", |
| 134 | + "notebook_metadata_filter": "all,-language_info,-toc,-latex_envs" |
| 135 | + }, |
| 136 | + "kernelspec": { |
| 137 | + "display_name": "Python 3 (ipykernel)", |
| 138 | + "language": "python", |
| 139 | + "name": "python3" |
| 140 | + }, |
| 141 | + "language_info": { |
| 142 | + "codemirror_mode": { |
| 143 | + "name": "ipython", |
| 144 | + "version": 3 |
| 145 | + }, |
| 146 | + "file_extension": ".py", |
| 147 | + "mimetype": "text/x-python", |
| 148 | + "name": "python", |
| 149 | + "nbconvert_exporter": "python", |
| 150 | + "pygments_lexer": "ipython3", |
| 151 | + "version": "3.11.5" |
| 152 | + }, |
| 153 | + "latex_envs": { |
| 154 | + "LaTeX_envs_menu_present": true, |
| 155 | + "autoclose": false, |
| 156 | + "autocomplete": true, |
| 157 | + "bibliofile": "biblio.bib", |
| 158 | + "cite_by": "apalike", |
| 159 | + "current_citInitial": 1, |
| 160 | + "eqLabelWithNumbers": true, |
| 161 | + "eqNumInitial": 1, |
| 162 | + "hotkeys": { |
| 163 | + "equation": "meta-9" |
| 164 | + }, |
| 165 | + "labels_anchors": false, |
| 166 | + "latex_user_defs": false, |
| 167 | + "report_style_numbering": false, |
| 168 | + "user_envs_cfg": false |
| 169 | + }, |
| 170 | + "toc": { |
| 171 | + "base_numbering": 1, |
| 172 | + "nav_menu": {}, |
| 173 | + "number_sections": true, |
| 174 | + "sideBar": true, |
| 175 | + "skip_h1_title": false, |
| 176 | + "title_cell": "Table of Contents", |
| 177 | + "title_sidebar": "Contents", |
| 178 | + "toc_cell": false, |
| 179 | + "toc_position": {}, |
| 180 | + "toc_section_display": true, |
| 181 | + "toc_window_display": true |
| 182 | + } |
| 183 | + }, |
| 184 | + "nbformat": 4, |
| 185 | + "nbformat_minor": 4 |
| 186 | +} |
0 commit comments