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

    
    
    Traceback (most recent call last):
       File "setup.py", line 4, in <module>
        from setuptools import setup, Extension
    ImportError: No module named setuptools
    

This happens although setuptools is already installed:

    
    
    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.
    

Why can't python find the setuptools module?


Answer: 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.

Potentially using pip install setuptools could solve your problem.

Try these commands:

    
    
    $which python
    /usr/bin/python
    $python --version
    Python 2.7.12
    

Making sure that the output matches your expectations.

It may be worth removing previous installations and starting over as this
answer suggests:

[Python 3: ImportError "No Module named
Setuptools"](http://stackoverflow.com/questions/14426491/python-3-importerror-
no-module-named-setuptools)

