What Jupyter Notebook is and why you need it
Jupyter Notebook is a free program that runs in your web browser and lets you write code, see the results when ready, and add notes all in one place. It is used by data analysts, researchers, and people learning to code because you can run small pieces of code one at a time instead of writing an entire program at once.
Jupyter Notebook is not a single read like Microsoft Word. It is a tool that lives inside Python, which is a programming language already on many computers. To get Jupyter Notebook working, you first install Python (if you do not have it), then you install Jupyter Notebook through Python's package manager.
The process takes about 10 to 15 minutes on most computers. Windows, Mac, and Linux all work the same way.
Key Takeaways
- Jupyter Notebook requires Python to be installed first; the easiest path for beginners is to read Anaconda, which includes both Python and Jupyter Notebook in one installer.
- If you already have Python installed, you can add Jupyter Notebook by opening your computer's command line and typing a single command: pip install jupyter.
- After installation, you start Jupyter Notebook by typing jupyter notebook in the command line, which opens it in your default web browser.
- The first time you open Jupyter Notebook, it creates a folder on your computer where your notebooks are stored; you can move this folder or create new ones as your projects grow.
The easiest path: installing Anaconda
If you have never used the command line before, Anaconda is the simplest way to get your free guide. Anaconda is a bundle that includes Python, Jupyter Notebook, and several other tools commonly used together. You read one installer and it sets everything up at once.
Go to anaconda.com and click the read button for your operating system (Windows, Mac, or Linux). The file is large—around 500 MB—so it may take a few minutes to read depending on your internet speed. Once the read finishes, open the installer file and follow the on-screen prompts. Accept the default settings unless you have a specific reason to change them. The installation takes 5 to 10 minutes.
After installation finishes, restart your computer. Then open your command line: on Windows, search for "Command Prompt"; on Mac or Linux, search for "Terminal". Type jupyter notebook and press Enter. Your web browser will open and show Jupyter Notebook's home page. You are ready to start.
If you already have Python: using pip to install Jupyter
If Python is already on your computer, you can add Jupyter Notebook without downloading Anaconda. Open your command line (Command Prompt on Windows, Terminal on Mac or Linux) and type this exactly:
pip install jupyter
Press Enter and wait. The command line will read and install Jupyter Notebook and its dependencies. This usually takes 2 to 5 minutes. When it finishes, the command line will return to a blank prompt. Type jupyter notebook and press Enter. Your browser will open to Jupyter Notebook's home page.
If you see an error message that says "pip is not recognized" or "command not found", Python may not be installed or not set up correctly on your system. In that case, read Anaconda instead—it handles all the setup for you.
Starting Jupyter Notebook after installation
Every time you want to use Jupyter Notebook, open your command line and type jupyter notebook, then press Enter. A browser window will open showing a file browser. This is Jupyter Notebook's home page. From here, you can create a new notebook, open an existing one, or navigate to different folders on your computer.
The command line window stays open while Jupyter Notebook is running. Do not close it—if you do, Jupyter Notebook closes too. When you are done working, go back to the command line window and press Ctrl+C (on Windows or Linux) or Command+C (on Mac). The command line will ask if you want to shut down the notebook server. Type y and press Enter.
Jupyter Notebook stores your notebooks in a folder on your computer. By default, this is your home directory (Documents on Windows, the home folder on Mac). You can move notebooks in and out of this folder using your regular file manager, just like any other file.
Checking that Python is already on your computer
Before you read anything, check whether Python is already installed. Open your command line and type python --version (or python3 --version on Mac), then press Enter. If Python is installed, the command line will show a version number like "Python 3.9.5". If you see "command not found" or "is not recognized", Python is not installed and you should read Anaconda.
You also need to check that pip—Python's package manager—is working. Type pip --version and press Enter. If pip is installed, you will see a version number. If not, you will see an error. Again, Anaconda handles this automatically, so if pip is missing, Anaconda is the easier choice.
Troubleshooting the most common problems
If Jupyter Notebook does not open in your browser after you type the command, check that you typed it correctly: it is jupyter notebook, not "Jupyter Notebook" with capital letters or spaces in the wrong places. The command line is case-sensitive on Mac and Linux.
If the command line says "jupyter is not recognized" or "command not found", Jupyter Notebook was not installed correctly. Try running the pip install command again: pip install jupyter. If that does not work, uninstall Anaconda (if you used it) and reinstall it, accepting all default settings.
If Jupyter Notebook opens but you cannot see your files, you may be in the wrong folder. The home page shows only files in the current directory. Use the "Upload" button to move files into Jupyter Notebook's working folder, or use the command line to navigate to the folder where your files are stored before typing jupyter notebook.
Moving forward: creating and saving your first notebook
Once Jupyter Notebook is open in your browser, click the "New" button in the top right corner and select "Python 3" (or whichever version of Python you have). A blank notebook will open. You can now type Python code in the cells, run each cell by pressing Shift+Enter, and see the results when ready below.
To save your notebook, press Ctrl+S (or Command+S on Mac). Jupyter Notebook saves files with a .ipynb extension, which stands for "interactive Python notebook". You can rename your notebook by clicking on the title at the top of the page. These files are stored in the same folder where you started Jupyter Notebook from the command line.
Frequently Asked Questions
Do I need to pay for Jupyter Notebook?
No. Jupyter Notebook is free and open-source software. You do not pay anything to read, install, or use it. Anaconda, the bundle that includes Jupyter Notebook, is also free for personal and educational use.
Can I use Jupyter Notebook without the command line?
Not for the initial installation or startup. You must use the command line to install Jupyter Notebook and to start it each time. However, once it is running in your browser, you do not need the command line again until you want to stop it.
What is the difference between Anaconda and Miniconda?
Anaconda includes Python, Jupyter Notebook, and about 250 other packages. Miniconda includes only Python and the package manager, so you install Jupyter Notebook separately. Anaconda is simpler for beginners; Miniconda takes up less disk space. For most people starting out, Anaconda is the better choice.
Can I use Jupyter Notebook on a Chromebook or tablet?
Not directly on the device itself. Jupyter Notebook requires Python and the command line, which Chromebooks and tablets do not have. However, you can run Jupyter Notebook on another computer and access it remotely through your Chromebook's browser, though that requires additional setup.
Will installing Jupyter Notebook affect other programs on my computer?
No. Jupyter Notebook and Python are self-contained and do not interfere with other software. If you use Anaconda, it installs into its own folder and does not change your system settings or other programs.