When it comes to data science, python with jupyter-lab seems to be the go-to choice.
However, when we start a new project, it always costs us half an hour or two to configure the right environment. Even just launching jupyter-lab and install our kernel to it.
In this tutorial, I give a quick step-by-step guidance on setting up a new data science development environment.
First, make sure anaconda
or miniconda
is installed.
Then, create a new python environment using
$ conda create -n myenv python=3.9
Now you create a new environment called myenv
with python version 3.9.
Next, activate the environment
$ conda deactivate
$ conda activate myenv
You should see something like this in terminal:
(myenv) $
Next, install jupyter-lab
(myenv) $ conda install -c conda-forge jupyterlab
As the last step, install current kernel to jupyterlab
(myenv) $ python -m ipykernel install --name myenv --display-name "myenv-display-name"
Now, you can run
(myenv) $ jupyter-lab
A new window of jupyter-lab will pop up.
OK, you are all set! Let's do real data science! ;)
Top comments (0)