title: Can't import C extension file in Python
body: <p><strong>My extension C function, in <code>pyc.c</code></strong></p>
  
  <pre><code>#include&lt;Python.h&gt;
  static PyObject *add(PyObject* self,PyObject* args) {
  
      int a=9;
      int b=10;
      int c=a+b;
      return Py_BuildValue(c);
  
      //return Py_BuildValue( "s","hiiiii");
  }
  
  static char prin_docs[] = "prin( ): Any message you want to put here!!\n";
  
  static PyMethodDef consume_methods[] = {
     {"add", (PyCFunction)add,
         METH_NOARGS, prin_docs},
         {NULL}
  };
  
  PyMODINIT_FUNC initadd(void) {
     Py_InitModule3(add, consume_methods,
                    "Extension module example!");
  }
  </code></pre>
  
  <p><strong>My setup file:</strong></p>
  
  <pre><code>from distutils.core import setup, Extension
  setup(name='add', version='1.0',  
        ext_modules=[Extension('add', ['pyc.c'])])
  </code></pre>
  
  <p><strong>My Python program that uses that C file:</strong></p>
  
  <pre><code>import add
  
  print(add.add());
  </code></pre>
  
  <p>The above code successfully created a .so object but I can't import in the Python program by executing that. I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "pycall.py", line 1, in &lt;module&gt;
      import add
  ImportError: No module named add
  </code></pre>