title: python - " Import error no module named httplib2" in only some files
body: <p>When I import the httplib2 in quickStart.py and run it using terminal It works.</p>
  
  <p>Now I import quickStart in another file main.py(Google app engine web app python file) and try loading the page via localhost it shows  "Import error no module named httplib2" while both files are in the same directory.
  It shows following error :-</p>
  
  <pre><code>ERROR    2015-10-13 12:41:47,128 wsgi.py:263]
  
  Traceback (most recent call last):
    File "C:\Program Files (x86)\google\google_appengine\google\appengine\runtime\wsgi.py", line 240, in Handle
      handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
    File "C:\Program Files (x86)\google\google_appengine\google\appengine\runtime\wsgi.py", line 299, in _LoadHandler
      handler, path, err = LoadObject(self._handler)
    File "C:\Program Files (x86)\google\google_appengine\google\appengine\runtime\wsgi.py", line 85, in LoadObject
      obj = __import__(path[0])
    File "G:\dtuwiki\dtuwiki2\main.py", line 7, in &lt;module&gt;
      import quickStart
    File "G:\dtuwiki\dtuwiki2\quickStart.py", line 2, in &lt;module&gt;
      import httplib2
  ImportError: No module named httplib2
  INFO     2015-10-13 18:11:47,398 module.py:809] default: "GET / HTTP/1.1" 500 -
  </code></pre>
  
  <p>main.py    </p>
  
  <pre><code>  import webapp2
      import jinja2
      import os 
      import cgi
      import quickStart
      template_dir = os.path.join(os.path.dirname(__file__), 'templates')
  
  
      root_dir = os.path.dirname(__file__)
      jinja_env = 
  
  jinja2.Environment(loader=jinja2.FileSystemLoader([template_dir,root_dir]),autoescape=True)
  
      def escapeHTML(string):
          return cgi.escape(string , quote="True")
  
  
  class Handler(webapp2.RequestHandler):
      def write(self,*a,**kw):
          #self.response.write(form %{"error":error})
          self.response.out.write(*a,**kw)
      def render_str(self,template,**params):
          t = jinja_env.get_template(template)
          return t.render(params)     
      def render(self , template ,**kw):
          self.write(self.render_str(template,**kw))
  </code></pre>
  
  <p>quickStart.py</p>
  
  <pre><code>from __future__ import print_function
  import httplib2
  import os
  
  from apiclient import discovery
  import oauth2client
  from oauth2client import client
  from oauth2client import tools
  
  import datetime
  
  try:
      import argparse
      flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
  except ImportError:
      flags = None
  
  SCOPES = 'https://www.googleapis.com/auth/calendar.readonly'
  CLIENT_SECRET_FILE = 'client_secret.json'
  APPLICATION_NAME = 'Google Calendar API Python Quickstart'
  
  
  def get_credentials():
  
      home_dir = os.path.expanduser('~')  
      credential_dir = os.path.join(home_dir, '.credentials')
      if not os.path.exists(credential_dir):
          os.makedirs(credential_dir)
      credential_path = os.path.join(credential_dir,
                                     'calendar-python-quickstart.json')
  
      store = oauth2client.file.Storage(credential_path)
      credentials = store.get()
      if not credentials or credentials.invalid:
          flow = client.flow_from_clientsecrets(CLIENT_SECRET_FILE, SCOPES)
          flow.user_agent = APPLICATION_NAME
          if flags:
              credentials = tools.run_flow(flow, store, flags)
          else: # Needed only for compatability with Python 2.6
              credentials = tools.run(flow, store)
          print('Storing credentials to ' + credential_path)
      return credentials
  </code></pre>
  
  <p>I also tried following --</p>
  
  <pre><code>$ python -m pip install httplib2
  Requirement already satisfied (use --upgrade to upgrade): httplib2 in /usr/local/lib/python2.7/site-packages
  Cleaning up...
  
  C:\WINDOWS\system32&gt;python -m pip -V
  pip 7.1.2 from C:\Python27\lib\site-packages (python 2.7)
  
  C:\WINDOWS\system32&gt;python -m pip list
  google-api-python-client (1.4.2)
  httplib2 (0.9.2)
  Jinja2 (2.8)
  oauth2client (1.5.1)
  pip (7.1.2)
  uritemplate (0.6)
  virtualenv (13.1.2)
  </code></pre>