Search code examples
google-colaboratorygspread

gspread keeps reverting to version 3.4.2 in Google Colab. I want to run 5.2.0 to avoid a time-out


I am using Google Colab. gspread 3.4.2 seems to be the default. I have uninstalled 3.4.2 and installed 5.2.0, but the next time I open the program with a new runtime, it is back to 3.4.2.

I am loading a large dataframe to a googlesheet, and it times out under 3.4.2, but works fine under 5.2.0.

What should I do to correct this?


Solution

  • From Google collaboration online examples you can install libraries, gspread is already installed but using an old version so you can just upgrade it to latest version like so:

    !pip install --upgrade gspread
    

    This will install latest version of gspread.