DEV Community

jzfrank
jzfrank

Posted on

Set up data science development: from zero to hero

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
Enter fullscreen mode Exit fullscreen mode

Now you create a new environment called myenv with python version 3.9.

Next, activate the environment

$ conda deactivate

$ conda activate myenv
Enter fullscreen mode Exit fullscreen mode

You should see something like this in terminal:

(myenv) $
Enter fullscreen mode Exit fullscreen mode

Next, install jupyter-lab

(myenv) $ conda install -c conda-forge jupyterlab
Enter fullscreen mode Exit fullscreen mode

As the last step, install current kernel to jupyterlab

(myenv) $ python -m ipykernel install --name myenv --display-name "myenv-display-name"
Enter fullscreen mode Exit fullscreen mode

Now, you can run

(myenv) $ jupyter-lab
Enter fullscreen mode Exit fullscreen mode

A new window of jupyter-lab will pop up.
OK, you are all set! Let's do real data science! ;)

Top comments (0)