title: Link Conda environment with Jupyter Notebook
body: <p>I'm trying to set a good environnement for doing some scientific stuff with python. To do so, I installed Jupyter &amp; miniconda.</p>
  
  <p>Then I want to be able to have different environnement and use them with Jupyter notebooks. So I created two custom envs with conda : py27 and py35.</p>
  
  <pre><code>&gt; conda env list
  # conda environments:
  #
  py27                     /Users/***/miniconda3/envs/py27
  py35                     /Users/***/miniconda3/envs/py35
  root                  *  /Users/***/miniconda3
  </code></pre>
  
  <p>Then on my notebook I have two kernels <code>python 2</code> and <code>python 3</code>.
  Inside a notebook, I get the following with the python3 kernel :</p>
  
  <pre><code>&gt; import sys
  &gt; print(sys.executable)
  /Users/***/miniconda3/envs/py35/bin/python
  </code></pre>
  
  <p>And this with the python2 kernel :</p>
  
  <pre><code>&gt; import sys
  &gt; print(sys.executable)
  /usr/local/opt/python/bin/python2.7
  </code></pre>
  
  <ul>
  <li>How can I set the <code>sys.executable</code> to miniconda env for python2 ?</li>
  <li>How can I bind a conda env with a notebook kernel ?</li>
  <li>Is doing <code>source activate py35</code> has a link with <code>jupyter notebook</code> ?</li>
  </ul>
  
  <p>I think I really missed something.</p>
  
  <p>Thank you everyone.</p>
  
  <p>--- edit</p>
  
  <p>I have multiple jupyter bin :</p>
  
  <pre><code>&gt; where jupyter
  /usr/local/bin/jupyter
  /usr/local/bin/jupyter
  /Users/ThomasDehaeze/miniconda3/bin/jupyter
  </code></pre>
  
  <p>I have only one kernel here <code>/usr/local/share/jupyter/kernels/python2</code>.
  But inside Jupyter, I have two kernels, <code>python2</code> and <code>python3</code>. Where can I find the other one ?</p>
  
  <hr>
  
  <p>I modified <code>kernel.json</code> from <code>/usr/local/share/jupyter/kernels/python2</code> :</p>
  
  <pre><code>{
   "display_name": "Python 2",
   "language": "python",
   "argv": [
    "/Users/***/miniconda3/envs/py27/bin/python2.7",
    "-m",
    "ipykernel",
    "-f",
    "{connection_file}"
   ]
  }
  </code></pre>
  
  <p>And then :</p>
  
  <pre><code>import sys
  print(sys.executable)
  /usr/local/opt/python/bin/python2.7
  </code></pre>
  
  <p>So nothing has changed</p>