I created a script last night to connect to my google sheets. It worked properly on my PC, and I pushed my changes to GitHub. I then worked on it some more on my personal laptop, pushed my changes to GitHub and then called it a day. I came back to my PC this morning to work on it some more. I pulled my changes and opened the notebook, and the script no longer works. I get the following error:
ModuleNotFoundError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import gspread
2 from oauth2client.service_account import ServiceAccountCredentials
4 scopes = {
5 "https://www.googleapis.com/auth/spreadsheets",
6 "https://www.googleapis.com/auth/drive"
7 }
ModuleNotFoundError: No module named 'gspread'
Did I do something in my workflow to mess this up? The package was installed using pip
pip install gspread
. I also tried !pip install gspread
AND !pip3 install gspread
within the notebook and it returns the following:
Requirement already satisfied: google-auth>=1.12.0 in c:usersnateanaconda3libsite-packages (from gspread) (2.32.0)
Requirement already satisfied: google-auth-oauthlib>=0.4.1 in c:usersnateanaconda3libsite-packages (from gspread) (1.2.1)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in c:usersnateanaconda3libsite-packages (from google-auth>=1.12.0->gspread) (5.4.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in c:usersnateanaconda3libsite-packages (from google-auth>=1.12.0->gspread) (0.4.0)
Requirement already satisfied: rsa<5,>=3.1.4 in c:usersnateanaconda3libsite-packages (from google-auth>=1.12.0->gspread) (4.9)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:usersnateanaconda3libsite-packages (from google-auth-oauthlib>=0.4.1->gspread) (2.0.0)
Requirement already satisfied: pyasn1<0.7.0,>=0.4.6 in c:usersnateanaconda3libsite-packages (from pyasn1-modules>=0.2.1->google-auth>=1.12.0->gspread) (0.6.0)
Requirement already satisfied: oauthlib>=3.0.0 in c:usersnateanaconda3libsite-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib>=0.4.1->gspread) (3.2.2)
Requirement already satisfied: requests>=2.0.0 in c:usersnateappdatalocalpackagespythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0localcachelocal-packagespython312site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib>=0.4.1->gspread) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in c:usersnateappdatalocalpackagespythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0localcachelocal-packagespython312site-packages (from requests>=2.0.0->requests-oauthlib>=0.7.0->google-auth-oauthlib>=0.4.1->gspread) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in c:usersnateappdatalocalpackagespythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0localcachelocal-packagespython312site-packages (from requests>=2.0.0->requests-oauthlib>=0.7.0->google-auth-oauthlib>=0.4.1->gspread) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:usersnateappdatalocalpackagespythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0localcachelocal-packagespython312site-packages (from requests>=2.0.0->requests-oauthlib>=0.7.0->google-auth-oauthlib>=0.4.1->gspread) (2.2.1)
Requirement already satisfied: certifi>=2017.4.17 in c:usersnateappdatalocalpackagespythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0localcachelocal-packagespython312site-packages (from requests>=2.0.0->requests-oauthlib>=0.7.0->google-auth-oauthlib>=0.4.1->gspread) (2024.2.2)
Maintaining environments always drives me crazy so any help is appreciated.