Import error: No module named gspread or csv?
csv, python
Solution
Try the following:
Check you don't have a file named csv.py
Check you have python version >= 2.3
Install gspread with:
`pip install gspread`
Problem
I am working with a Google spreadsheet, and am trying to use Python 2.7 to convert the spreadsheet data to a CSV file. When I attempt to run the script I receive: ``` Import error: No module named gspread. ``` When I take out the `gspread` portion, then I receive: ``` Import error: No module named csv. ``` Any suggestions would be greatly appreciated. Thank you in advance. ``` import csv import gspread g=gspread.login('skiesgoinggreen@gmail.com', 'e-mail_password') docid = "0AgNp9UJ4CX93dHl3RW9GRXJDS3kxaXRJMGNqWmhQWVE" spreadsheet = g.open_by_key(docid) for i, worksheet in enumerate(spreadsheet.worksheets()): filename = docid + '-worksheet' + str(i) + '.csv' writer = csv.writer(open(filename, 'wb')) writer.writerows(worksheet.get_all_values()) ```