Getting Started with JupyterLab
Install a stand-alone Jupyterlab, change the root directory, and create a desktop icon.
JupyterLab is a web-based interactive development environment (IDE) for working with Jupyter notebooks, code, and data. It provides a modern, flexible, and powerful platform for data science and scientific computing.
JupyterLab is built on top of the Jupyter notebook format, which allows you to combine live code, equations, visualizations, and narrative text in a single document. You can use JupyterLab to write and execute code in a variety of programming languages, such as Python, R, Julia, and others.
JupyterLab also provides a range of tools and features for data exploration, visualization, and collaboration, including:
- A powerful text editor for writing and editing code and markdown
- An interactive console for running code and inspecting results
- A file browser for organizing and managing files and directories
- A terminal for running command-line programs
- An extension system for adding new functionality and customizing the interface
JupyterLab is widely used in data science, machine learning, and scientific computing, and is an important tool for researchers, students, and professionals working with data.
Installation
- If you want to create a new environment to use it for installing all the packages you are going to work with, you can create a conda environment using the following command in your terminal
conda create -n serapeum python=3.9- I have used the name serapeum for my environment, I have initialized the environment with python only.
- The created environment will be in the default directory of your installed miniconda/anaconda in the envs folder.
- Activate the environment
conda activate serapeum- Then install JupyterLab from the conda-forge channel
conda install -c conda-forge JupyterLab- You will notice that conda will install a long list of packages, you might need to enter y or yes to allow conda to download and install all the dependencies.
Configuration
- In the same terminal where your environment is activated, use the following command to generate the configuration file
jupyter notebook --generate-config- The command will tell you if you already have an old configuration file or not.
- the default directory in Windows
C:\users\<user_name>\.jupyter\jupyter_notebook_config.py)- In Linux
home/<username>/.jupyter/jupyter_notebook_config.py- Then go to the displayed directory and open the config file in a text editor.
- Now we have two things that we want to change, first is the root directory, and the second is to make JupyterLab open in a stand-alone mode and not in your browser.
Change root directory
- In the config file, search for the following line and then uncomment it, and put the root directory you want.
#c.NotebookApp.notebook_dir = ""- After changing the root directory to my C drive
c.NotebookApp.notebook_dir = "C:/"Stand-alone
- To make JupyterLab a standalone application and not to open in your google chrome browser beside your 100 messy opened tabs,
- JupyterLab is still going to use chrome but it will be opened separately, so we need to know where google chrome is installed, so search for the chrome.exe file, it will be in either the “Program Files” or the “Program Files (x86)” in windows, or in “/usr/bin/google-chrome” in ubuntu Linux.
- so for Windows put the following line at the end of the config file
c.NotebookApp.browser = "C:/Program Files/Google/Chrome/Application/chrome.exe --app=%s"Desktop shortcut Icon
- now that we made Jupyterlab opens in a stand-alone mode and changed the root directory, we want a desktop icon like any other software so we can just double-click and open it.
- To do so go to your desktop and create a shortcut by pressing right-click anywhere on your desktop, then press on Shortcut
- A new window will be opened and put the path to the Jupyterlab executable file in the location field in the opened window.
C:\Miniconda3\envs\serapeum\Scripts\jupyter-lab.exe- The first path of the previous path “C:\Miniconda3” is the directory where I installed miniconda.
- The second part “envs\serapeum” is the new environment that I have created
- The third part “scripts” is where the executables of the installed packages are located
- Then press next, and give a name to your shortcut
- Now we have the desktop shortcut, open it with a double-click, then you will have two windows opened, the first looks like a terminal.
- The second window is the stand-alone JupyterLab, with the root directory (as we defined it in the config file) opened in the left panel.
- You should not close the first window (the terminal window) as long as you are using JupyterLab, as if you close it you are disconnecting JupyterLab from the Jupyter server and you have to relaunch JupyterLab again.
- You can change the desktop icon by downloading any icon file (file with .ico extension) and assigning it to the shortcut. (check this site https://icon-icons.com/icon/jupyter-app/161280)
- press right-click on the shortcut>> properties >> change icon>> select the downloaded icon
- Now the desktop icon looks like this
- You have to know that only the packages that are installed in the environment that we have created above, can be imported into your notebooks that you will work on in this JupyterLab.
- So now you can go and start creating your nootbooks.

