(Maybe needs sudo)
- Google APIs Client Library => pip install --upgrade google-api-python-client
(If you install google-api-python-client fail in macOS, try to use 'pip install --user --upgrade google-api-python-client.)
- Create a project in Google Console(shoul be enable Drive API) and generate your own "client_secrets.json" file.
- >> python googleDriveAccess.py
- Copy Google Sheet File_ID and paste to console.
- Copy Access Token from browser and paste to console.
- Got exported file.
- Open googleDriveAccess.py
- Modify
FILE_NAME: the name what you want to save for file. Default file name is: language.csv
SAVE_PATH: the path where file to save. Default path is: ./
FILE_ID: Google spreadsheet file_id got from page URL. If you left this blank, you need input every time when execute googleDriveAccess.py
-
If you got AttributeError: 'Module_six_moves_urllib_parse' on earlier versoin than macOS El Capitan. Try to execute following command
=> easy_install --upgrade six -
The "six module" was fixed in v1.4.1 in macOS default python library since El Capitan and we can not change/upgrade it.
Referenc:http://stackoverflow.com/questions/29485741/unable-to-upgrade-python-six-package-in-mac-osx-10-10-2We can check the Six module version by following steps:
a. pip show six
b. $ python
>> import six; six._version_
- The google-api-python-client use the v1.5+ of "six module" after v1.3.2, hence we have few choice:
1). Use older version google-api-python-client v1.3.2
2). homebrew install python. (Don't use deault python on macOS install new one)
3). Use virtualenv
4). Use pip install --user