Python: modul not found after Anaconda installation
<p>I've successfully installed Python 2.7 and Anaconda but when i try to import a library i get always this error:</p>

<pre><code>&gt;&gt;&gt; import scipy
Traceback (most recent call last):
File "&lt;stdin&gt;", line 1, in &lt;module&gt;
ImportError: No module named scipy
</code></pre>

<p>I've set up the <code>PYTHONHOME</code> to <code>C:\Python27</code> and <code>PYTHONPATH</code> to <code>C:\Python27\Lib</code>. </p>

<p><strong>EDIT : content of PATH</strong></p>

<p>In my $PATH variable i have <code>C:\Users\Mattia\Anaconda2</code>, <code>C:\Users\Mattia\Anaconda2\Scripts</code> and <code>C:\Users\Mattia\Anaconda2\Library\bin</code>.</p>

<p>Do i have to set any other env veriables?</p>

<p>The problem is that you should not have either <code>PYTHONPATH</code> or <code>PYTHONHOME</code> set.  They are both pointing to a non-Continuum version of Anaconda, I believe.  Anaconda will install (by default) into a directory called <code>Anaconda</code>, either at <code>C:\Anaconda</code> or at <code>C:\Users\USERNAME\Anaconda</code> (IIRC).  It is generally recommended that you should not ever set <code>PYTHONPATH</code> or <code>PYTHONHOME</code>, except as a last resort, exactly because of these kinds of problems.</p>

<p>You can see which Python interpreter you're running by doing:</p>

<pre><code>&gt;&gt;&gt; import sys
&gt;&gt;&gt; sys.executable
</code></pre>

<p>And then you can see what directories are ending up in your Python library path (where <code>import</code> statements will look for packages, such as <code>scipy</code> and <code>numpy</code>) by doing one of the following:</p>

<pre><code>&gt;&gt;&gt; import sys
&gt;&gt;&gt; sys.path
</code></pre>

<p>or the more readable version:</p>

<pre><code>&gt;&gt;&gt; import sys
&gt;&gt;&gt; for p in sys.path:
...    print p
</code></pre>

python windows python-2.7 anaconda