How To Install Jupyter Notebook on Mac and Windows
Table of Contents
Introduction
We recommend installing Jupyter Notebook as part of either Anaconda or as an addition to Miniconda. Jupyter Notebook can be installed separately, but having either Anaconda or Miniconda already installed makes installing Jupyter Notebook easier.
Chromebook users, please see this article because the installation process is slightly different.
Anaconda, Miniconda, and Conda
Anaconda is a Python and R distribution that comes with all the tools you need to start working with data, including packages, development environments, and more. However, it requires a lot of memory (3 GB). Miniconda is a “minimal” version of Anaconda that requires less memory (about 50 MB) but does not come with any packages or environments pre-installed.
Both Anaconda and Miniconda come with conda. Conda is a package manager. Package managers help with installing, updating, and removing packages. Pip is another popular package manager, and we will use both. The difference between conda and pip is that conda manages packages and environments in any language (including Python), whereas pip only manages Python packages.
We will use pip to manage Python packages since it is the method recommended by the Python Packaging Authority. Conda’s role in our workflow is to manage Jupyter Notebook.
What should I install?
If you have 3 GB of space on your computer and want the most straightforward installation, install Anaconda. Scroll to the Windows Anaconda or Mac Anaconda section below.
If you do not have 3 GB of space available or you want to save space and don’t mind doing some manual work, install Miniconda. Scroll to Windows Miniconda or Mac Miniconda
Windows
You will need to know what System type (number of bits) you have before downloading the package (for more on bits, see here). If you are unsure, let’s check!
On Windows 10 and Windows 8.1:
- Select the Start button, then select Settings > System > About.
- At the right, under Device specifications, see System type.
On Windows 7:
- Select the Start button, right-click Computer, and then select Properties.
- Under System, see the System type.
Windows Anaconda
Go to the Anaconda Downloads page and download the appropriate version of Anaconda (32- or 64-Bit Graphical Installer)
- Double click on the .exe file and click Install.
- Read and agree to the licensing terms.
- Select if you want to install for ‘Just Me’ or ‘All Users’. If you are installing for ‘All Users’, you must have Administrator privileges.
- You will be prompted to select the installation location. By default, Anaconda should try to install in your home directory. We recommend accepting this default. Click Install.
- You will be asked if you want to add Anaconda to your PATH environment variable. Do not add Anaconda to the PATH because it can interfere with other software.
- You will be asked if you want Anaconda to be your default version of Python. We recommend ‘Yes’. There are some rare instances where you might not make Anaconda the default version, but they are beyond the scope of this article.
- Click the Install button.
- Go ahead and finish the installation.
Now you can verify your installation. Go to the Windows Start menu and search for ‘Anaconda Navigator’ (not the Anaconda Prompt).
If it appears, it is installed. Congratulations!
Double click on it, and the Anaconda Navigator window should appear.
Your applications screen may look slightly different from this one, but that is ok. Click the Launch button under Jupyter Notebook. A Jupyter Notebook interface will appear in your default browser.
An Anaconda Prompt might also open and display a url. If it does, do not close it until you are done working with Jupyter Notebook. If it does not appear, don’t worry - this has to do with your operating system and will not affect Jupyter Notebook’s performance.
Congratulations!! You are ready to move on to the next article and get started using Jupyter Notebook!
Windows Miniconda
Go to the Miniconda Downloads page. Download the appropriate (32- or 64-Bit) Python 3.X version of Miniconda.
- Double click on the .exe file and click Install.
- Read and agree to the licensing terms.
- Select if you want to install for ‘Just Me’ or ‘All Users’. If you are installing for ‘All Users’, you must have Administrator privileges.
- You will be prompted to select the installation location. By default, Anaconda should try to install in your home directory. We recommend accepting this default. Click Install.
- You will be asked if you want to add Anaconda to your PATH environment variable. Do not add Anaconda to the PATH because it can interfere with other software.
- You will be asked if you want Anaconda to be your default version of Python. We recommend ‘Yes’. There are some rare instances where you might not make Anaconda the default version, but they are beyond the scope of this article.
- Click the Install button.
First, let’s verify that Miniconda was installed. We will use the Anaconda Prompt (miniconda3)
Go to the Start Menu and search for the Anaconda Prompt. Anaconda Prompt is the Command Line Interface (CLI) we will use with Miniconda (more about the Command Line). In the shell, type:
conda --version
A number should be returned. This is the version number of conda that you have installed.
Now we need to install a few key packages. In the Anaconda Prompt, type
conda install jupyter
When prompted with ‘Proceed ([y]/n)?’ type y
Once the installation completes, in the Anaconda Prompt, type:
jupyter notebook
A Jupyter Notebook interface will appear in your default browser.
An Anaconda Prompt might also open and display a url. If it does, do not close it until you are done working with Jupyter Notebook. If it does not appear, don’t worry — this has to do with your operating system and will not affect Jupyter Notebook’s performance.
Let’s install a few packages to get you started working with data in Jupyter Notebook. These are all Python packages, so we will use pip
instead of conda
to install them.
We will load:
- pandas for working with DataFrames.
- scikit-learn for machine learning.
- Matplotlib for visualizations.
- seaborn for statistical visualizations.
- NLTK for text analysis.
- spaCy for more text analysis.
Note that some of these packages depend on other packages. For example, scikit-learn requires NumPy (among others). Package managers (like pip) automatically find all the dependencies and install them for you. So when you install scikit learn, pip automatically installs NumPy, and any other dependencies scikit-learn needs.
Open a new Anaconda Prompt and type the following commands (hit ‘Enter’ after each row):
pip install pandas
pip install scikit-learn
pip install matplotlib
pip install seaborn
pip install nltk
pip install beautifulsoup4
You can check to be sure these are all installed by starting Python in your Anaconda Prompt.
On a new line, type python
The header will change to be >>>
:
You can import each package on a separate line or take a shortcut and import them all at once. Type:
import pandasimport sklearnimport matplotlibimport seabornimport nltkimport bs4
Or:
import pandas, sklearn, matplotlib, seaborn, nltk, bs4
If nothing happened, everything is installed perfectly, and you are ready to move on to the next article. Congratulations!!!
What if it didn’t work? You will probably get this error message:
ModuleNotFoundError: No module named MODULE
(Note that ‘packages’, ‘modules’, and ‘libraries’ all refer to the same thing.)
No worries — let’s debug! Usually, this is caused by a typo. There are two places to look:
- your import statement
- your installation statement
Check the import statement first. Try import MODULE
, where MODULE is the module listed in the Error message. (In our case above, the statement import scikitlearn
was the problem because scikit-learn must be imported with import sklearn
.) If there is no typo there, go back to the installation step.
You will have to open a new Anaconda Prompt (this one is still running Python). Try importing the module specified in the error message using pip install MODULE
. Then return to your window running Python and trying to import the module again.
If you are still having trouble, be sure to reach out on the Codecademy forum for help.
Mac
You will need to have access to your BASH or zsh Terminal. This is also called the Command Line Interface (CLI). If this is new to you, please see this article or take a Bash course before proceeding.
Mac Anaconda
Go to the Anaconda Downloads page and download the 64-Bit Graphical Installer for Mac.
- Double click on the .pkg file and click Install.
- Read and agree to the licensing terms.
- Select if you want to install for ‘Just Me’ or ‘All Users’. If you are installing for ‘All Users’, you must have 4. Administrator privileges.
- You will be prompted to select the installation location. By default, Anaconda should try to install in your home directory. We recommend accepting this default. Click Install.
- You will be asked if you want to add Anaconda to your PATH environment variable. Do not add Anaconda to the PATH because it can interfere with other software.
- You will be asked if you want Anaconda to be your default version of Python. We recommend ‘Yes’. There are some rare instances where you would not make Anaconda the default version, but they are beyond the scope of this article.
- Click the Install button.
- You may be asked if you want to install PyCharm. PyCharm is another IDE (similar to Jupyter Notebook) but is not necessary right now.
- Go ahead and finish the installation.
Now you can verify your installation. Go to your Applications folder and double-click on Anaconda Navigator.
If the shortcut doesn’t appear (since Anaconda isn’t a regular program, it may appear differently depending on your operating system), click Command + Shift and search for ‘Anaconda Navigator’. If you have to do this, we recommend manually creating a shortcut to your Applications, Desktop, or any other folder you find convenient.
Double click on it, and the Anaconda Navigator window should appear.
Your applications screen may look slightly different from this one, but that is ok. Click the Launch button under Jupyter Notebook. A Jupyter Notebook interface will appear in your default browser.
You may also notice that an Anaconda Prompt also opened. This needs to stay open while you are working in Jupyter Notebook. For more information about the features available in Anaconda, see the Anaconda Documentation.
Congratulations!! You are ready to move on to the next article.
Mac Miniconda
Go to the Miniconda Downloads page. Download the Miniconda3 MacOSX 64-bit pkg
- Double click on the .pkg file and click Continue.
- Read and agree to the licensing terms.
- Select if you want to install for ‘Just Me’ or ‘All Users’. If you are installing for ‘All Users’, you must have Administrator privileges.
- You will be prompted to select the installation location. By default, Anaconda should try to install in your home directory. We recommend accepting this default. Click Install.
- You will be asked if you want to add Miniconda to your PATH environment variable. Do not add Miniconda to the PATH because it can interfere with other software.
- You will be asked if you want Miniconda to be your default version of Python. We recommend ‘Yes’. There are some rare instances where you would not make Miniconda the default version, but they are beyond the scope of this article.
- Click the Install button.
First, let’s verify that Miniconda was installed. Open a BASH or zsh terminal and type:
conda --version
A number should be returned. This is the version number of conda that you have installed.
Now we need to install a few key packages. In the BASH or zsh terminal, type:
conda install jupyter
When prompted with ‘Proceed ([y]/n)?’ type y
.
Once the installation completes, in the BASH or zsh terminal, type:
jupyter notebook
A Jupyter Notebook interface will appear in your default browser.
You may also notice that the BASH or zsh terminal is now displaying a url. This needs to stay open while you are working in Jupyter Notebook.
Let’s install a few packages to get you started working with data in Jupyter Notebook. These are all Python packages, so we will use pip
instead of conda
to install them.
We will load:
- pandas for working with DataFrames.
- scikit-learn for machine learning.
- Matplotlib for visualizations.
- seaborn for statistical visualizations.
- NLTK for text analysis.
- spaCy for more text analysis.
Note that some of these packages depend on other packages. For example, scikit-learn requires NumPy (among other packages). Package managers (like pip) automatically find all the dependencies and install them for you. So when you install scikit-learn, pip automatically installs NumPy, and any other dependencies scikit-learn needs.
Open a new BASH or zsh terminal and type the following commands:
pip install pandas
pip install sklearn
pip install matplotlib
pip install seaborn
pip install nltk
pip install beautifulsoup4
You can check to be sure these are all installed by starting Python in your Terminal.
On a new line, type python
.
The header will change to >>>
You can import each package on a separate line or take a shortcut and import them all at once.
import pandasimport sklearnimport matplotlibimport seabornimport nltkimport bs4
Or:
import pandas, sklearn, matplotlib, seaborn, nltk, bs4
What if they are not installed correctly? You will get this error message:
ModuleNotFoundError: No module named MODULE
(Note that ‘packages’ and ‘modules’ are the same thing.)
No worries — let’s debug! Usually, this is caused by a typo. There are two places to look:
- your import statement
- your installation statement
Check the import statement first. Try import MODULE
, where MODULE is the module listed in the Error message. (In our case above, the statement import scikitlearn
was the problem because scikit-learn must be imported with import sklearn
.) If there is no typo there, go back to the installation step.
You will have to open a new Anaconda Prompt (this one is still running Python). Try importing the module specified in the error message using pip install MODULE
. Then return to your window running Python and trying to import the module again.
If you are still having trouble, be sure to reach out on the Codecademy forum for help.
Next Steps
Now that you have a development environment installed on your computer, you are ready to start working locally! For more on using Jupyter, see the next article.
Author
The Codecademy Team, composed of experienced educators and tech experts, is dedicated to making tech skills accessible to all. We empower learners worldwide with expert-reviewed content that develops and enhances the technical skills needed to advance and succeed in their careers.
Meet the full teamRelated articles
- Article
Installing Python 3 and Python Packages
Learn how to install Python packages and download Python 3 with Anaconda and Miniconda on Mac and Windows. - Article
Installing Jupyter Notebook on a Chromebook
This article will teach you how to run Jupyter Notebook on Chromebooks so you can do off-platform Python projects on your Chromebook.