{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Lecture 29:\n", "\n", "- Learn how to install anaconda python and the packages used in this course\n", "- Learn how to install **git** on your laptop. **git** is an open source repository for software and other projects like notebooks. \n", "- Learn how to use this class on your own laptop. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Installation of Anaconda Python on OSX\n", "\n", "Macs come with a version of Python already installed; but this pre-installed version does NOT have everything you will need to run most of the scripts we have been working on, so you will still need to download Anaconda.\n", "\n", "- Download and install Anaconda Python 3 from this website: [https://www.anaconda.com/products/individual](https://www.anaconda.com/products/individual). If you are running OSX Catalina or later, you MUST use the command line installer, not the graphical installer.\n", "\n", "- If you already installed Anaconda Python, and then you upgrade to OSX Catalina, you will need to reinstall Anaconda using the command line installer.\n", "\n", "- Open your command line (Terminal). See Lecture 1 for more information on finding your command line.\n", "\n", "- Download a few non-default Python packages by running the following commands:\n", " \n", " - conda install future cartopy pandas matplotlib \n", " - conda install scripttest --channel conda-forge --no-deps \n", " - pip install --upgrade pip setuptools \n", "\n", "- When running these commands you may see some warnings about dependencies, but you can just ignore them!\n", "- If a package fails to install, you may need to use “sudo”: i.e., sudo pip install scripttest. You will then be asked for your computer password\n", "\n", "\n", "\n", "- Installation of **git** on OSX.\n", " - you must use bash as your shell (not csh, zsh, etc.). This is the default fo OSX so if you have set up a different shell, you wil ned to switch back by selecting from you terminal window Terminal --> Preferences. \n", " - download and intstall git for Mac OS X from this website: [https://git-scm.com/downloads](https://git-scm.com/downloads).\n", "\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Installation of Anaconda Python on Windows\n", "\n", "\n", "- Download and install Anaconda Python 3 from this website: [https://www.anaconda.com/download](https://www.anaconda.com/download). \n", "- Select an install for Just Me, not for all users. You should select “Add Anaconda to my PATH environment variable” in Advanced Installation Options (if available). Otherwise, stick with the defaults.\n", "- Open your command line (Command Prompt). See Lecture 1 for more information on finding your command line.\n", "- Note: if you did not add Anaconda Python to your PATH as recommended above, you will open the “Anaconda Prompt” instead.\n", "- Create and activate a new conda Python environment with some required packages:\n", " \n", " - conda create -n future cartopy pandas matplotlib \n", " - conda install scripttest --channel conda-forge --no-deps \n", " - pip install --upgrade pip setuptools\n", "\n", "- To learn about managing conda environments, etc., see the Anaconda documentation and cheatsheet from this website: [https://docs.anaconda.com/anaconda/user-guide/cheatsheet/](https://docs.anaconda.com/anaconda/user-guide/cheatsheet/). \n", "- To make sure that you have installed Python successfully, type python on your command line. You should see something like this:\n", " \n", "Python 3.6.4 |Anaconda custom (32-bit)| (default, Jan 16 2018, 10:21:59) [MSC v.1900 32 bit (Intel)] on win32 \n", "Type \"help\", \"copyright\", \"credits\" or \"license\" for more information. \n", "\\>\\>\\>\n", "\n", "(Type “quit()” and then hit enter to end your python session)\n", "\n", "- Installation of **git** on Windows:\n", " - Open your command prompt as an admin (right click on the Command Prompt icon and selec \"Run as administrator\").\n", " - Download and install git from this website [https://git-scm.com/downloads](https://git-scm.com/downloads). \n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Installing Python_for_Earth_Science_Students\n", "\n", "Now that you have anaconda Python and git installed, you can also install this class and stay up-to-date as the class evolves.\n", "- in your terminal window, navigate to the directory that you want to put the class.\n", "- then type: \n", "\n", "git clone https://github.com/ltauxe/Python-for-Earth-Science-Students.git \n", "\n", "- You will find the class in the folder created for it. \n", "- keep up to date, but navigating to the folder and typing: \n", "\n", "git pull\n", "\n", "- That will update your notebooks to the most current version (if things change). \n", "- If you want to edit notebooks, be sure to make a copy, or they will get over-written each time you update. \n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.7" } }, "nbformat": 4, "nbformat_minor": 2 }