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.
Download and install Anaconda Python 3 from this website: 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.
If you already installed Anaconda Python, and then you upgrade to OSX Catalina, you will need to reinstall Anaconda using the command line installer.
Open your command line (Terminal). See Lecture 1 for more information on finding your command line.
Download a few non-default Python packages by running the following commands:
When running these commands you may see some warnings about dependencies, but you can just ignore them!
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
Installation of git on OSX.
Download and install Anaconda Python 3 from this website: https://www.anaconda.com/download.
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.
Open your command line (Command Prompt). See Lecture 1 for more information on finding your command line.
Note: if you did not add Anaconda Python to your PATH as recommended above, you will open the “Anaconda Prompt” instead.
Create and activate a new conda Python environment with some required packages:
To learn about managing conda environments, etc., see the Anaconda documentation and cheatsheet from this website: https://docs.anaconda.com/anaconda/user-guide/cheatsheet/.
To make sure that you have installed Python successfully, type python on your command line. You should see something like this:
Python 3.6.4 |Anaconda custom (32-bit)| (default, Jan 16 2018, 10:21:59) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
(Type “quit()” and then hit enter to end your python session)
Now that you have anaconda Python and git installed, you can also install this class and stay up-to-date as the class evolves.
git clone https://github.com/ltauxe/Python-for-Earth-Science-Students.git
git pull