03. January 2021
Anaconda
anaconda cmd
install env as kernal
1conda install -c anaconda ipykernel
2python -m ipykernel install --user --name ex --display-name "Python (ex)"
ref: https://gdcoder.com/how-to-create-and-add-a-conda-environment-as-jupyter-kernel/
using anaconda in docker (not working yet)
after upgrading my MacOS to big sur, my Jupiter lab and anaconda suddenly become broken with some NSProcess error.
1# search all available image
2docker search continuumio
3# pull the desired image
4docker pull continuumio/anaconda3
5# create and use the image
6docker run -t -i continuumio/miniconda /bin/bash
7# test
8conda info
9# To install and launch the Jupyter Notebook
10docker run -i -t -p 8888:8888 continuumio/miniconda /bin/bash \
11-c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir \
12/opt/notebooks && /opt/conda/bin/jupyter notebook \
13--notebook-dir=/opt/notebooks --ip='*' --port=8888 \
14--no-browser"
15
16
env
1# create conda environment with yaml file
2conda env create -f file_name.yml
3# activate the env, env_name is specified in the yaml file
4conda activate env_name
5# after some mod, use this to create your own env.yaml
6conda env export > environment.yml