Using conda environments the right way
Instructions on setting up and using conda environment the right way on Windows.
- install
anaconda
.install in
user
mode and not inadmin
mode. - start the
Anaconda Prompt (anaconda3)
using start menu.this should automatically activate the
base
environment. - create a
conda
environment named (for example)data-science-env
.conda create --name data-science-env python=3.8
- activate the
conda
environment.conda activate data-science-env
- install any required
package
usingconda
orpip
.pip install scikit-learn
orconda install scikit-learn
- create a notebook kernel connected with the conda environment just created.
python -m ipykernel install --user --name data-science-env --display-name data-science-env-kernel
- use the
base
environment to startjupyter-notebook
orjupyter-lab
.You should find a kernel named
data-science-env-kernel
.