Let us say you want to install both Tensorflow 2.0 and Tensorflow 1.15 in Jupyter Notebook.įor this example first, agree if you want to use the GPU or CPU version of Tensorflow. conda install pipĬreating environments in conda and Jupyter Notebook Also, if pip is not installed in each sub-environment the package might just be installed in the “base” conda environment, causing an error where the package is not found in your sub-environment. In my opinion it is a good idea to add the pip package manager to the base (and each sub-) environment, as not all packages are supported by conda install. A good default setting is included with the following install command: conda install -c conda-forge jupyter_contrib_nbextensionsĪ good overview over other extensions: (Optional) Installing pip package manager I really like Jupyter Notebook extensions, which support a lot of autocompletion, additional information, and in general things that make your life easier. Installing Jupyter Lab conda install -c conda-forge jupyterlab Installing Jupyter Notebook (default) conda install -c conda-forge notebookĬonda install -c conda-forge nb_conda_kernels Our plan is to only install it in the base environment, and then just switch between sub-environments to avoid setting up Jupyter Lab in each environment. Jupyter Notebook can easily be installed using conda. Install Jupyter Notebook / Lab in the base environment The base environment is activated by default. Switching between environments works as simply as typing conda activate and if done with it deactivating it (and going back to the base environment) with conda deactivate. It should currently just show the “base” environment installed.
To list the currently installed environments just type conda env list If conda is installed correctly (might need a logout and login, or restart), you should be able to see the output when typing conda into your terminal. Checking and switching the conda environments LATEST_ANACONDA=$(wget -O - 2>/dev/null | sed -ne (x86) $LATEST_ANACONDAĬhmod +x Anaconda3*.sh # make it executableįollow the dialogue, and just agree on the defaults. The first link crawls the website for the newest version and writes it to the LATEST_ANACONDA variable. To install Anaconda or Miniconda head over to their website ( ), or if you are using Linux just copy the following commands. working on a server, where disk space is limited. Miniconda is a barebones version of Anaconda and can be nice if you are e.g. Furthermore switching between Tensorflow 2.0 and Tensorflow 1.15 becomes easy as well, finally allowing you to switch between versions easily (which can be quite a headache otherwise). if a program only runs with Python 2.7 or older versions of Matplotlib, you can create an own workspace for this program and switch back to Python 3 with a click of a button. Additionally, it allows creating environments in python, which contain different versions of your Python packages.
If Anaconda (conda) and Jupyter Notebook (Jupyter Lab) are set up the right way the combination of them can become the perfect team, where you are able to easily switch between Deep Learning conda environments.