PyDrive icon indicating copy to clipboard operation
PyDrive copied to clipboard

ImportError: No module named apiclient

Open EdLichtman opened this issue 7 years ago • 1 comments

Steps to recreate:

  1. Set up a brand new environment
  2. Download the latest Drive SDK
  3. Download the latest PyDrive library

Run this:

from pydrive.auth import GoogleAuth

def main():
    gauth = GoogleAuth()
    # Create local webserver and auto handles authentication.
    gauth.LocalWebserverAuth()

if __name__ == '__main__':
    main()

You'll see this ImportError. Apparently Google versioned ApiClient out in it's latest releases? You'll need to change "from apiclient" for any of the imports to "from googleapiclient"

EdLichtman avatar Nov 15 '18 03:11 EdLichtman

I ran into this too. Changing from apiclient to from googleapiclient in /usr/local/lib/python2.7/dist-packages/pydrive/auth.py and /usr/local/lib/python2.7/dist-packages/pydrive/files.py fixed it.

cflinspach avatar Dec 12 '18 18:12 cflinspach