OSX set up Python (Anaconda): Difference between revisions
No edit summary |
|||
(11 intermediate revisions by 5 users not shown) | |||
Line 7: | Line 7: | ||
=== Download option #1 === | === Download option #1 === | ||
<font size="+1">Try to download the installer from [https:// | <font size="+1">Try to download the installer from either of these places:</font> | ||
* [https://repo.anaconda.com/archive/Anaconda3-2023.03-MacOSX-x86_64.pkg This file which contains Anaconda and Python 3.10 for MacOS for Intel-based Macs] | |||
* [https://repo.anaconda.com/archive/Anaconda3-2023.03-MacOSX-arm64.pkg This file which contains Anaconda and Python 3.10 for MacOS for the newer M1 Macs] | |||
=== Download option #2 === | === Download option #2 === | ||
If option 1 above doesn't work for any reason, download the Python 3. | If option 1 above doesn't work for any reason, download the Python 3.10 option from [https://www.anaconda.com/distribution/#download-section Anaconda's website]. If necessary, scroll down to the "macOS Installer" section. | ||
=== Installation === | === Installation === | ||
{{Notice|If you are on MacOS 10.15 (Catalina), '''you must follow an additional step'''. If you don't, Anaconda won't work quite right! }} | {{Notice|If you are on MacOS 10.15 (Catalina), '''you must follow an additional step''' which is noted below. 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. | To install Anaconda, simply open the package and follow the prompts. You may be asked to enter your password by Package Installer. | ||
Line 32: | Line 35: | ||
[[File:Macos-anaconda-self-delete.png|thumb|none|200px|Prompt from Package Installer asking if it is OK to trash the installation package.]] | [[File:Macos-anaconda-self-delete.png|thumb|none|200px|Prompt from Package Installer asking if it is OK to trash the installation package.]] | ||
== Test your Python install == | == Test your Python install == | ||
Line 59: | Line 51: | ||
[[File:Jupyternb launch.png|500px]] | [[File:Jupyternb launch.png|500px]] | ||
Your default browser is where you'll be working with Jupyter Notebooks. | |||
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. | ||
When you launched the notebook from Anaconda, you may have noticed a Terminal window popped up, like this: | |||
[[File:Terminal.png|500px]] | [[File:Terminal.png|500px]] | ||
You can hide it, but do not close it during the whole time when you are using the Jupyter Notebook. If you close it, your Jupyter Notebook will be closed automatically. | |||
To close Anaconda, first go to your terminal, then, press "CONTROL+C" keys, you will see a new line on your terminal: | |||
[[File:Shutdownline.png]] | [[File:Shutdownline.png]] | ||
Press "y", then press "RETURN". Now your Anaconda is closed :) | Press "y" key, then press "RETURN" key. Now your Anaconda is closed :) | ||
Now Anaconda is not running on your terminal. You can press the "x" on the upper left corner of your terminal window to close the terminal as well. | |||
Line 91: | Line 89: | ||
== Success! == | == Success! == | ||
You have installed and configured Python. You can move on to the | You have installed and configured Python. You can move on to the next step. | ||
[[Category:CDSW]] | [[Category:CDSW]] |
Latest revision as of 03:43, 28 March 2023
Download and install Python[edit]
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[edit]
Try to download the installer from either of these places:
- This file which contains Anaconda and Python 3.10 for MacOS for Intel-based Macs
- This file which contains Anaconda and Python 3.10 for MacOS for the newer M1 Macs
Download option #2[edit]
If option 1 above doesn't work for any reason, download the Python 3.10 option from Anaconda's website. If necessary, scroll down to the "macOS Installer" section.
Installation[edit]
If you are on MacOS 10.15 (Catalina), you must follow an additional step which is noted below. 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[edit]
- 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.
Test your Python install[edit]
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:
Your default browser is where you'll be working with Jupyter Notebooks.
If for some reason you don't see something in your browser, let a mentor know.
When you launched the notebook from Anaconda, you may have noticed a Terminal window popped up, like this:
You can hide it, but do not close it during the whole time when you are using the Jupyter Notebook. If you close it, your Jupyter Notebook will be closed automatically.
To close Anaconda, first go to your terminal, then, press "CONTROL+C" keys, you will see a new line on your terminal:
Press "y" key, then press "RETURN" key. Now your Anaconda is closed :)
Now Anaconda is not running on your terminal. You can press the "x" on the upper left corner of your terminal window to close the terminal as well.
Success! You've gotten Anaconda and Python working on your Mac!
Success![edit]
You have installed and configured Python. You can move on to the next step.