OSX set up Python (Anaconda): Difference between revisions
No edit summary |
|||
Line 58: | Line 58: | ||
One of the options (it's the middle option in the screenshot) should be called "Jupyter Notebook". Click that to open Jupyter Notebook! After a few seconds, you'll see a new tab open in your default browser. It will look something like this: | One of the options (it's the middle option in the screenshot) should be called "Jupyter Notebook". Click that to open Jupyter Notebook! After a few seconds, you'll see a new tab open in your default browser. It will look something like this: | ||
[[File:Jupyternb launch.png|500px]] | |||
If for some reason you '''don't''' see something in your browser, let a mentor know. | If for some reason you '''don't''' see something in your browser, let a mentor know. | ||
To close Anaconda, | To close Anaconda, first open your terminal (you can search for "terminal" in your mac), and you can see something like this: | ||
[[File:Terminal.png|500px]] | |||
Then, press "CONTROL+C", you will see a new line on your terminal: | |||
[[File:Shutdownline.png]] | |||
Press "y", then press "RETURN". Now your Anaconda is closed :) | |||
<!-- | <!-- |
Revision as of 23:00, 17 January 2020
Download and install Python
We're going to be installing Python using a software collection that includes Python. The collection is called Anaconda. Anaconda includes the Python programming language and a bunch of different pieces of software that are useful for data science and analysis. Although the collection includes all free software, it is put together by a commercial company called Continuum Analytics.
Note: Even if you already have a version of Python on your computer, we suggest you follow these instructions and download Anaconda. This will help ensure that you can follow along during our in-class activities, and will make it easier for mentors to help you if you get stuck on something.
Download option #1
Try to download the installer from this file which contains Anaconda and Python 3.7 for MacOS.
Download option #2
If option 1 above doesn't work for any reason, download the Python 3.7 option from Anaconda's website. If necessary, scroll down to the "Anaconda 2019.10 for macOS Installer" section.
Installation
![]() |
If you are on MacOS 10.15 (Catalina), you must follow an additional step. If you don't, Anaconda won't work quite right! |
To install Anaconda, simply open the package and follow the prompts. You may be asked to enter your password by Package Installer.
-
Make sure you download the version for Python3
-
Opening the file with Package Installer will guide you through the setup process
-
You may be prompted for your password
-
Package Installer will install Anaconda3
Install notes
- If you get stuck during the install process, ask a neighbor or raise your hand for help. These instructions may also be helpful.
- At the end of the installer, you may be prompted if you'd like to send the installation package to the trash. Doing so won't damage the installation and will free up ~600MB of disk space on your computer.
![](/upload/thumb/f/fb/Macos-anaconda-self-delete.png/200px-Macos-anaconda-self-delete.png)
- If you are using MacOS 10.15 (Catalina) or above, you will need to configure the system to recognize Anaconda. To do so, open Terminal.app (either using Command-space or opening Applications > Utilities > Terminal.app and entering the following:
/opt/anaconda3/bin/conda init zsh
You should end up with something like this:
![A terminal window showing the result of configuring Conda and MacOS Catalina.](/upload/thumb/c/ce/Macos-conda-zsh.png/300px-Macos-conda-zsh.png)
Quit Terminal (either with Command-Q or the menu option Terminal > Quit Terminal).
Test your Python install
To use Anaconda on MacOS, you will primarily use the Anaconda Navigator; It lets you manage the installed python tools, create custom setups, and launch tools like Jupyter.
The easiest way to launch the Anaconda Navigator is from inside the Applications folder:
The navigator will start up and greet you with a list of installed and available tools:
One of the options (it's the middle option in the screenshot) should be called "Jupyter Notebook". Click that to open Jupyter Notebook! After a few seconds, you'll see a new tab open in your default browser. It will look something like this:
If for some reason you don't see something in your browser, let a mentor know.
To close Anaconda, first open your terminal (you can search for "terminal" in your mac), and you can see something like this:
Then, press "CONTROL+C", you will see a new line on your terminal:
Press "y", then press "RETURN". Now your Anaconda is closed :)
Success! You've gotten Anaconda and Python working on your Mac!
Success!
You have installed and configured Python. You can move on to the next step.