title: Google API Python Client: "from six.moves import zip ImportError: No module named moves"
body: <p>I am trying to use the Google Sheets API in my Python 2.7 code using the googleapiclient but I get the following error: "from six.moves import zip
  ImportError: No module named moves ".</p>
  
  <p>I am using Python 2.7.10 on Mac.</p>
  
  <p>My programme is built using Webapp2, deployed on Google AppEngine and is connected to Google Datastore.</p>
  
  <p>I am using Google's best practice for using third party libraries, using <code>requirements.txt</code>, <code>lib/</code> and <code>appengine_config.py</code>, described here:
  <a href="https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27#installing_a_third-party_library" rel="nofollow noreferrer">https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27#installing_a_third-party_library</a></p>
  
  <p>I have tried listing six as a bundled library in my <code>app.yaml</code></p>
  
  <p>I have tried playing around with different versions of <code>six</code> and <code>google-api-python-client</code></p>
  
  <p>I have tried the solutions suggest here:</p>
  
  <p>1) <a href="https://stackoverflow.com/questions/49188151/importerror-no-module-named-moves">ImportError: No module named moves</a></p>
  
  <p>2) <a href="https://stackoverflow.com/questions/50768023/google-app-engine-from-six-moves-import-http-client-no-module-named-moves/51616840#51616840">Google App Engine: from six.moves import http_client no module named moves</a></p>
  
  <p>Things to note:</p>
  
  <p>I can make a successful Google Sheets API call from my Python shell.</p>
  
  <p>I tried a different, clunkier approach; downloading <code>google-api-client-gae-1.2.zip</code> from <a href="https://code.google.com/archive/p/google-api-python-client/downloads" rel="nofollow noreferrer">https://code.google.com/archive/p/google-api-python-client/downloads</a> and unzipping it in my root directory. This required importing <code>apiclient</code> into my code instead of <code>googleapiclient</code> and whilst it did not have any trouble importing six.moves, it threw missing API Key errors. I believe these errors would not be an issue if I solve the six.moves import error above as I have a <code>GOOGLE_APPLICATION_CREDENTIALS</code> environment variable set which the <code>google_api_python_client</code> would pick up on.</p>
  
  <p>My code:</p>
  
  <pre><code>from googleapiclient import discovery
  
  class SpreadsheetProcessor:
  
      def __init__(self, spreadsheet_id, range_):
          service = discovery.build('sheets', 'v4')
          request = service.spreadsheets().values().get(
              spreadsheetId=spreadsheet_id, range=range_)
          response = request.execute()
          self.results = [value[0] for value in response['values']]
  </code></pre>
  
  <p>My pip freeze:</p>
  
  <pre><code>autopep8==1.4.3
  cachetools==3.0.0
  certifi==2018.11.29
  chardet==3.0.4
  enum34==1.1.6
  fancycompleter==0.8
  futures==3.2.0
  google-api-core==1.7.0
  google-api-python-client==1.7.7
  google-auth==1.6.2
  google-auth-httplib2==0.0.3
  google-cloud-core==0.29.1
  google-cloud-datastore==1.7.3
  googleapis-common-protos==1.5.6
  grpcio==1.18.0
  httplib2==0.12.0
  idna==2.8
  linecache2==1.0.0
  pdbpp==0.9.3
  protobuf==3.6.1
  pyasn1==0.4.5
  pyasn1-modules==0.2.3
  pycodestyle==2.4.0
  Pygments==2.3.1
  pyrepl==0.8.4
  pytz==2018.9
  requests==2.21.0
  rsa==4.0
  six==1.12.0
  traceback2==1.4.0
  uritemplate==3.0.0
  uritemplate.py==3.0.2
  urllib3==1.24.1
  wmctrl==0.3
  </code></pre>
  
  <p>My full stack trace:</p>
  
  <pre><code>ERROR    2019-01-20 11:52:23,705 wsgi.py:263]
  Traceback (most recent call last):
    File "/Users/muzzialdean/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
      handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
    File "/Users/muzzialdean/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
      handler, path, err = LoadObject(self._handler)
    File "/Users/muzzialdean/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
      obj = __import__(path[0])
    File "/Users/muzzialdean/Muzzi/tech-tests/ghostr/ghostr.py", line 3, in &lt;module&gt;
      from models import Ghost, GhostDatabase
    File "/Users/muzzialdean/Muzzi/tech-tests/ghostr/models.py", line 2, in &lt;module&gt;
      from googleapiclient import discovery
    File "/Users/muzzialdean/Muzzi/tech-tests/ghostr/lib/googleapiclient/discovery.py", line 21, in &lt;module&gt;
      from six.moves import zip
  ImportError: No module named moves
  INFO     2019-01-20 11:52:23,715 module.py:861] default: "GET / HTTP/1.1" 500 -
  </code></pre>