Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a default environment for Anaconda / Jupyter?

I have installed Anaconda for my Machine Learning course. I'm using it as IPython (Jupyter) notebook, in which we have lessons. OS is Ubuntu 14.04 LTS. Basically, I always run it from Terminal with:

jupyter notebook

I have created new environment called su_env from root environment (exact copy) with one package added. Now, I'm wondering: how can I set environment su_env as default one? I have dozen of notebooks so it's annoying to set up each time for every notebook the environment, in "web" GUI of Jupyter.

EDIT: I'm interested in a solution where you don't have to set environment before running notebook. My logic is that, somehow, automagically, jupyter sets root environment on its own while starting up. Because of that, I'm wondering is it possible to set some config file or something so jupyter sets su_env instead of root. Also, if you know that's not possible (and why), I would like to know that.

like image 223
ceruleus Avatar asked Aug 16 '16 20:08

ceruleus


1 Answers

You can use this on conda prompt:

conda activate env_name

jupyter notebook

source activate env_name gives me an error: 'source' is not recognized as an internal or external command, operable program, or batch file.

like image 195
Dhruv Bishnoi Avatar answered Oct 03 '22 00:10

Dhruv Bishnoi