Python can't find setuptools
<p>I got the following ImportError as i tried to setup.py install a package:</p>

<pre><code>Traceback (most recent call last):
   File "setup.py", line 4, in &lt;module&gt;
    from setuptools import setup, Extension
ImportError: No module named setuptools
</code></pre>

<p>This happens although setuptools is already installed:</p>

<pre><code>amir@amir-debian:~$ sudo apt-get install python-setuptools
[sudo] password for amir: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-setuptools is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
</code></pre>

<p>Why can't python find the setuptools module? </p>

<p>It's possible you have multiple python versions installed on your system. For example if you installed your python from source, and then again with apt-get. Apt-get will install to the default python version. Make sure you are being consistent. </p>

<p>Potentially using pip install setuptools could solve your problem.</p>

<p>Try these commands:</p>

<pre><code>$which python
/usr/bin/python
$python --version
Python 2.7.12
</code></pre>

<p>Making sure that the output matches your expectations.</p>

<p>It may be worth removing previous installations and starting over as this answer suggests:</p>

<p><a href="http://stackoverflow.com/questions/14426491/python-3-importerror-no-module-named-setuptools">Python 3: ImportError &quot;No Module named Setuptools&quot;</a></p>

python python-2.7 setuptools