Installing Jupyter and VS Code for Python Development

This post is part of a series that will teach you to use Python if you come from Java. I highly recommend you start from here if you don’t know o only has a little bit of Python knowledge. Let’s begin.

You already have installed Python. (If you don’t have installed Python yet, you can follow my recommendation in the post Installing Python). But installing python is not enough. Besides that we have Python IDLE, you will need extra tools to explore and learn Python. These tools include Jupyter and an any Text Editor.

NOTE: In the moment we write this post I recommend you Microsoft Visual Studio Code known as VS Code.

What is Jupyter?

Project Jupyter

The jupyter.org documentation says: “Jupyter”, or “Project Jupyter” is a large umbrella project that covers many different software offerings and tools. That includes Jupyter Notebook and JupyterLab, which are both popular notebook-editor programs. I don’t want to go deeper right now in Jupyter Notebook and JupyterLab. I’m going to do that later in other post.

Before to continue I need to explain a little bit the difference between Jupyter Notebook and Jupyter Notebook back-end. The difference lies in their roles and functionalities. Jupyter Notebook is the front-end. Is what you see and interact with, and Jupyter Notebook back-end is the engine behind Jupyter Notebook. It handles the execution of your code and manages the necessary resources behind the scenes.

For the purpose of this series. We only need to install in our computers Jupyter Notebook back-end. Because you need the engine that provides the core services, APIs, and REST endpoints for Jupyter web applications. In other words is the engine that makes everything work behind the scenes.

Here’s a clearer explanation of it’s purpose:

  • Code Execution: The back-end is responsible for executing the code you write in the notebook cells. This is done through “kernels,” which are processes that run the code in different programming languages, like Python.
  • Resource Management: It manages the resources needed to execute the code, like memory and processing.
  • User Interaction: It provides the web interface you see in your browser. Allowing you to write and execute code, as well as view the results interactively.
  • Extensions and Customization: It allows adding extra functionalities through extensions. Like tools for data visualization or integration with other services.

Installing Jupyter Notebook back-end?

Now that we have a little information about Jupyter, you need to install Jupyter Notebook back-end. So, open a terminal and introduce the next command:

After execute the command, you will see the Successfully installed message like is show below, you are good to continue.

If you have problems you can refer to the Jupyter documentation to install Jupyter.

VS Code

Microsoft Visual Studio Code (often referred to as VS Code) is a free and lightweight code editor. It is also powerful. This editor was developed by Microsoft. It’s designed for building and debugging modern web and cloud applications. As I mentioned before, at the moment that I write this post VS Code is the most popular IDE. So, let’s use it.

To install it, grab you favorite browser and introduce the URL (https://code.visualstudio.com/Download) to download VS Code. Then select your VS Code version compatible version for your computer and follow the instructions. If you want to know more of VS Code you can refer the documentation.

Configuring VS Code

Open your VS Code, and open the Preferences > Settings to see a window like this:

VS Code Preferences> Settings

In this window, you can setup your editor as you wish. Changing the Font Size or enabling the Auto Save, etc. Now you need to install some VS Code extensions: Python and Jupyter. In the lateral menu select the extensions icon Extensión Icon to open the Extensions window.

VS Code Extensions window

Python Extension

The Python extension, provides VS Code a rich support for Python language. Now type Python in the Search Extensions in Marketplace input. You will be see the Python available extensions displayed in the windows. I recommend to install the Microsoft extensions, now only click in install and wait the installation finish.

Python Extensions

Jupyter Extension

Jupyter extension provides basic notebook support for language kernels that are supported in Jupyter Jupyter Notebooks. Also, it allow the Python environment to be used as Jupyter Kernel.

Lastly, we need to install the Jupyter Extension, type Jupyter in the Search Extensions in Marketplace input. Again I recommend to use the Microsoft extensions. Now install it by clicking in the install button and wait the installation finish.

Now, with Python, Jupyter Notebooks back-end and VS Code you are all set.

If you have been using VS Code before or used before (with Java or other language). It will be a piece of cake installing these extensions. Now you are an step closer to learn Python, see you in the next.

Happy Learning!!!

Leave a comment