how to install Jupyter Lab¶

To keep the version of Python and its packages consistent, a virtual environment is usually used for each of your Python projects. It helps also to determine which Python version you use in your project which is handy when you have several versions on your system. First you create a directory where your project will be in, for instance datalab for your data explorations. On Unix alike systems inclusive MacOs you can do it on command line in your terminal with

mkdir datalab

which creates the directory datalab in your current directory you have been in your terminal (the command mkdir stands for make directory) Now you need to go into that directory with the command

cd datalab

cd stands for change directory. Existing file or directory names often doesn't need to be fully typed out, you can often speedup with just type the first letters and use the tab key which completes the name

Now its time to create the virtual environment and activate it. You create it with Python itself and give it a name:

python3.13 -m venv datalabEnv

In my case I have several Python versions on my system and want explicitely use python3.13. -m venv are the commands to create the virtual environment and I called it in my case datalabEnv

Now it has to be activated which is done with

source datalabEnv/bin/activate

from now on all Python packages installations done with pip are only happen in this environment and not on the global system level. Jupyter Lab is installed via

pip install jupyterlab

and we want also install the Python libraries Pandas and Matplotlib which we use for data processing

pip install pandas matplotlib