Jupyter Notebooks I: Getting Started with Jupyter Notebooks

In the Virtual Environments II, I showed you how to create a directory and activate a virtual environment for your Python data science project. I also showed you how to install some libraries: Ipykernel, Jupyter Notebook, Pandas and Matplotlib. In this tutorial, we’re going to discuss Ipykernel and how to get started with Jupyter Notebooks.

Image by Reimund Bertrams from Pixabay

I. Creating a Kernelspec to Start Using Jupyter Notebooks

Project Jupyter Logo
Project Jupyter Logo
Jupyter
$ pip3 install ipykernel jupyter notebook
python -m ipykernel install — user — name my_project_env — display-name “my_project_env”
Installed kernelspec my_project_env in /Users/myusername/Library/Jupyter/kernels/my_project_env

II. Launching Jupyter Notebook

4. Now that you have Jupyter notebook installed and you’ve used ipykernel to create a kernel spec, you should be able to launch a Jupyter notebook by entering the following:

$ jupyter notebook
import pandas as pd

III. What Did We Do?

  1. Checked to see if we installed Ipykernel and Jupyter Notebooks.
  2. Used Ipykernel to create a kernelspec to link our virtual environment to Jupyter.
  3. Launched a new notebook in the browser.
  4. Checked our Pandas package installation.

VI. What is Next?

Keep reading to learn how to link your project to GitHub in GitHub I. In later tutorials, you’ll learn some tips about how to use Jupyter Notebooks.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store