How to set the default python path for anaconda?
<p>i have installed anaconda on a linux machine.
I noticed that after deactivating the anaconda environment with:</p>

<pre><code>source deactivate
</code></pre>

<p>When running:</p>

<pre><code>which python
</code></pre>

<p>I get:</p>

<pre><code>/home/user/anaconda/bin/python
</code></pre>

<p>Instead of</p>

<pre><code>/usr/bin/python
</code></pre>

<p>How can i restore this setting?</p>

<p>The comments somewhat cover the answer to the question, but to clarify:</p>

<p>When you installed Anaconda you must have agreed to have it added to your PATH.  You'll want to check in your <code>~/.bash*</code> files and look for any <code>export PATH=</code> lines to check this.  So Anaconda is <strong>always</strong> on your path.  The <code>source deactivate</code> command will only deactivate "sub" Conda environments.  It will never remove what is called the "root" Conda environment (the one you originally installed).  If you don't want Anaconda on your <code>PATH</code> by default then remove it from your <code>~/.bash*</code> startup files.  Then when you want to use Anaconda you'll need to add it to your <code>PATH</code>.  Or just add the specific Conda environment you are interested in to your <code>PATH</code> directly, and don't worry about the <code>activate</code> and <code>deactivate</code> scripts.  At their core all they do is modify <code>PATH</code>.</p>

<p>I hope that helps clarify things.</p>

python anaconda