Hacker News new | ask | show | jobs
by bitanarch 1986 days ago
You should use Anaconda instead of pip to install data science related tools in Python.

```

$ conda create -n {new_environment_name} python

$ conda activate {new environment name}

$ conda install jupyterlab

```

4 comments

You also have to manually add the kernel for that environment via:

({new_environment_name}) ...$ python -m ipykernel install --user --name {new_environment_name} --display-name "Python ({new environment display name})"

The env won't be accessible in jupyter (lab or notebook) until you do this step.

[0] https://stackoverflow.com/questions/39604271/conda-environme...

Nope, what he wrote works just fine at least for conda. That advice is only if you want to be able to choose environments as kernels in the frontend. If you just run jupyter lab/notebook in a conda env which has it installed, the default kernel will be in the activated environment.
Note that you now have to pay for a commercial anaconda license if you're using it for anything that isn't education or hobbyist stuff.

https://www.anaconda.com/blog/anaconda-commercial-edition-fa...

I don't think that is true if you install miniconda.

https://docs.conda.io/en/latest/miniconda.html

    conda install -c conda-forge jupyterlab=3
why?