Installing and Launching Jupyter
In this lesson, you’ll learn how to install and launch Jupyter Notebook. You’ll see that installing it is easy to do using pip:
pip install jupyter
Launching Jupyter can be done by running this command:
jupyter notebook
Running the command above will start the Jupyter Notebook server and allow you to create new Notebooks.
00:00 Now we’re going to take a look at how to install and launch Jupyter Notebooks. For this, I’m going to head over to my terminal. If your terminal is a different color, don’t worry about it—it has the exact same functionality.
00:12
I would suggest installing Jupyter Notebooks using Python 3, but it also works with Python 2. In this case, I created a virtual environment and I’m running Python 3 in there, so I can just go ahead and type pip install jupyter
, press Enter, and then we have to wait a bit.
00:58
So, there we are. I just skipped over the install because there’s really nothing you can do but wait. But once this is installed, you can launch Jupyter Notebooks by typing jupyter notebook
.
01:15
And then it should open up this tab for you inside of your browser. If it doesn’t open it up by itself, you can just head to this URL, localhost
on port 8888
, and that’s going to bring you to this window.
01:28 There’s nothing to see here yet. What we’re going to do at first is create a new Notebook by pressing on this New menu item and creating a new Notebook—Python 3.
01:44 And here we are, inside of our Jupyter Notebooks. Let’s go ahead and explore how they work in the next video.
Martin Breuss RP Team on Aug. 25, 2019
Hei Ignacio! What installation problems did you run into?
vinohs on June 5, 2020
Hey Martin, maybe you could start with installing the virtual environment also?, just a small suggestion :).
Martin Breuss RP Team on June 9, 2020
Hi @vinohs! You don’t need to use a virtual environment to install Jupyter, although I would suggest you to use one. You can read more about how to set one up in Python Virtual Environments: A Primer.
Siggi Berg on Nov. 12, 2020
Hey Martin. I keep getting kernel error when I launch new notebook. I’m using Python 3.9 in a virtual enviroment on Windows 10. Here is the error traceback:
Traceback (most recent call last):
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\tornado\web.py", line 1704, in _execute
result = await result
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
type=mtype))
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 176, in start_kernel
kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\jupyter_client\multikernelmanager.py", line 185, in start_kernel
km.start_kernel(**kwargs)
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\jupyter_client\manager.py", line 309, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\jupyter_client\manager.py", line 256, in pre_start_kernel
self.write_connection_file()
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\jupyter_client\connect.py", line 474, in write_connection_file
kernel_name=self.kernel_name
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\jupyter_client\connect.py", line 138, in write_connection_file
with secure_write(fname) as f:
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\jupyter_core\paths.py", line 435, in secure_write
win32_restrict_file_to_user(fname)
File "c:\users\sigurdur1\.venv\jupyter-env\lib\site-packages\jupyter_core\paths.py", line 361, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed: The specified module could not be found.
Bartosz Zaczyński RP Team on Nov. 13, 2020
@Siggi Berg It looks like some kind of an environment-related problem. Have you tried Googling the error message yet? Maybe this Stack Overflow question will help.
Siggi Berg on Nov. 16, 2020
@Bartosz Zaczynski. Thank you. There was a problem with the PATH as I had more than one versions of python installed . Your post directed on right course. Problem fixed.
Glenn Lehman on July 5, 2021
I may be missing a small part when I installed this I got a huge list of folders. To set up I ran the Windows Powershell. Then the PIP command you indicated. I ended up we a very sluggish notbook. Did I start from the wrong point?
rubynicholls on Feb. 21, 2024
Hi, I installed jupyter, message below:
Successfully installed ipywidgets-8.1.2 jupyter-1.0.0 jupyter-console-6.6.3 jupyterlab-widgets-3.0.10 notebook-7.1.0 qtconsole-5.5.1 qtpy-2.4.1 widgetsnbextension-4.0.10
When I try to run the command: jupyter notebook
I get the below error: ‘jupyter’ is not recognized as an internal or external command, operable program or batch file.
Is there something that I’m doing wrong?
when I look in my Python folder Python > Python3111 > Scripts I can see that there are files with jupyter within them and file type is Application. Eg jupyter-execute, jupyter-console so I think it must be here?
Become a Member to join the conversation.
Ignacio De La Madrid on Aug. 15, 2019
Suggestion Martin, you can definitely cut out that long wait for the install or mention how you could solve installment problems during…