Cloning conda environments



You can clone (duplicate, copy) environments, this is useful when you are experimenting with packages whereas everything else is working fine:

- Existing tensorflow_gpu
- Newly created tensorflow_cpu


$ conda create --name py37 --clone base

List your environments :
$ conda info --envs
# conda environments:
#
                         /Users/uki/.julia/conda/3
                         /Users/uki/.julia/packages/ORCA/uEiWT/deps
base                  *  /anaconda3
py2                      /anaconda3/envs/py2
py37                     /anaconda3/envs/py37

Change to the newly created one:

$ source activate py37
Register this environment with Jupyter Notebook


$ python3 -m ipykernel install --user --name py37 --display-name "Python 3.7 (py37)"


Installed kernelspec py37 in /Users/uki/Library/Jupyter/kernels/py37


$ cd /Users/uki/Library/Jupyter/kernels/py37
$ code kernel.json

{
"argv": [
"/anaconda3/bin/python3",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3.7 (py37)",
"language": "python"
}





As an Amazon Associate I earn from qualifying purchases.

My favorite quotations..


“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”  by Robert A. Heinlein

"We are but habits and memories we chose to carry along." ~ Uki D. Lucas


Popular Recent Articles