title: Anaconda python not available from sudo
body: <p>I installed Anaconda in a Google Cloud Compute environment and can use it successfully from the shell as a normal user:</p>
  
  <pre><code>curt@lamp-v5mi:~$ python
  Python 2.7.9 |Anaconda 2.2.0 (64-bit)| (default, Mar  9 2015, 16:20:48) 
  [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  Anaconda is brought to you by Continuum Analytics.
  Please check out: http://continuum.io/thanks and https://binstar.org
  </code></pre>
  
  <p>However, when I start an interpreter via <code>sudo python</code>, anaconda is not the interpreter used, and I would like it to be.</p>
  
  <pre><code>curt@lamp-v5mi:~$ sudo python
  Python 2.7.3 (default, Mar 13 2014, 11:03:55) 
  [GCC 4.7.2] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  </code></pre>
  
  <p>Confusingly, when I start a shell as root <em>and then</em> start an interpreter, anaconda <em><strong>is</strong></em> the interpreter used.</p>
  
  <pre><code>curt@lamp-v5mi:~$ sudo -s
  root@lamp-v5mi:/home/curt# python
  Python 2.7.9 |Anaconda 2.2.0 (64-bit)| (default, Mar  9 2015, 16:20:48) 
  [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  Anaconda is brought to you by Continuum Analytics.
  Please check out: http://continuum.io/thanks and https://binstar.org
  </code></pre>
  
  <p>I have <code>export PATH="/anaconda/bin:$PATH"</code> in both the root's and my normal account's <code>.bashrc</code> files.  At first I thought the issue was <code>sudo python</code> not actually starting a root shell, and thus the <code>export PATH="/anaconda/bin:$PATH"</code> not actually being done.  But when from my normal account I do <code>sudo echo $PATH</code>, it shows anaconda in there:</p>
  
  <pre><code>curt@lamp-v5mi:~$ sudo echo $PATH
  /anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
  </code></pre>
  
  <p>The anaconda installation was installed as root in <code>/anaconda</code> and I did a <code>chmod -R 770 /anaconda</code> to make it accessible to normal users, but I don't think this problem has anything to do with that.</p>
  
  <p><strong>How can I get anaconda to be the default interpreter when run from a <code>sudo</code> command line?</strong></p>