When do system variables update in IPython kernel?
<p>I started a notebook by doing <code>jupyter notebook</code>, and then creating a new notebook.  </p>

<p>Then, I went to the terminal, and I set the PATH:</p>

<pre><code>export PATH=$PATH:&lt;absolute path&gt;
</code></pre>

<p>But, then when I go back to the IPython notebook, I try to print this new system variable:  </p>

<pre><code>import os
print(os.environ["PATH"].split(os.pathsep))
</code></pre>

<p>But, I don't see my <code>&lt;absolute path&gt;</code> that I just added??</p>

<p>I even tried restarting the kernel, but this doesn't help at all.  What can I do?  Thank you.</p>

<p><strong>EDIT</strong>:</p>

<p>I tried to refresh my environmental variables via the terminal by doing: <code>bash --login</code>, but this did not help at all. </p>

<p>Also, another thing that is peculiar about this is that when I add it to the system path manually in ipython:   </p>

<pre><code>os.environ['PATH'] = os.environ['PATH'] + os.pathsep + &lt;absolute path&gt;
</code></pre>

<p>...it works fine in the notebook and kernel where I added it.  But, when I spin up another IPython kernel, it isn't on the PATH anymore.</p>

<p>I'm on <code>osx</code>.</p>

<p>When you do</p>

<pre><code>export PATH=$PATH:&lt;absolute path&gt;
</code></pre>

<p>in a terminal, it is only effective in this terminal session. That is to say, this <code>export</code> command has no effect on other terminal sessions.</p>

<p>If you want your PATH environment to be effective all the way, you need to edit your .bashrc file, and</p>

<pre><code>source ~/.bashrc
</code></pre>

<p>to activate it. </p>

python osx environment-variables ipython jupyter-notebook