3

When I run Gspread with Python3, I get this error:

ImportError: No module named 'gspread'

When I run with just Python, I get no errors. I installed gspread with pip install gspread --user. I really need to use Python 3, and I expect I should be able to, but I just did something wrong.

MonoWolfChrome
  • 218
  • 2
  • 15
Jake 1986
  • 582
  • 1
  • 6
  • 25

4 Answers4

1

Did you install your pip update in an environment? Doing

 pip3 install gspread --user
pensebien
  • 506
  • 4
  • 16
0

Make sure you are using the correct interpreter.

You may have one or more python interpreters installed so it may be installing to a different one.

  • Any suggestions for the person to check your assumption? – Rudi Strydom Sep 18 '20 at 19:49
  • Well if they are in visual studio code, or any relevant IDE. They should be able to press CRTL shift P. Then type in python interpreter. If there are multiple Python versions to choose from, they may need to change their interpreter from the list given. – jordan_says Sep 21 '20 at 22:48
0

You have to install pip for python3 using apt install python3-pip

Then you can install using pip3 install gspread --user

0

I used to have this issue, running

python -m pip install gspread

instead of

pip install gspread

did the trick for me.

Jan Marek
  • 11
  • 1