PyDrive
PyDrive copied to clipboard
ImportError: No module named apiclient
Steps to recreate:
- Set up a brand new environment
- Download the latest Drive SDK
- 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"
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.