No module named 'gspread' when trying to import gspread - python

I am trying to import gspread in Jupyter but this error keeps popping up:
ModuleNotFoundError: No module named 'gspread'
I am using Python version 3.8.1 and pip version 19.3.1. I installed gspread in the command line and it all seems fine but when I try to import it in the notebook I always get an error. Also tried using PyCharm but the same error exists.
Please, help!

Try installing it in Jupyter Notebook using:
!pip install gspread==3.6.0

Related

ModuleNotFoundError: No module named 'pymysql' in jupyter

I am getting below error after importing pymysql in jupyter notebook. Please help me to find error.
import pymysql
print("Welcome")
ModuleNotFoundError
<ipython-input-5-7978bc79cc40> in <module>()
1 import pymysql
2 print("Here")
ModuleNotFoundError: No module named 'pymysql'
You have not installed the module pymysql
Try :
python -m pip install pymysql
Or
python3 -m pip install pymysql
for python3.
It appears that pymsql is not installed in your python environment you are working on.
Please type below command in a cell in jupyter notebook, then run the cell.
!pip install pymysql
This should resolve your problem.
The reason why despite installation of the pymysql in your system, the issue ModuleNotFoundError: No module named 'pymysql' occurs is because Anaconda does not recognize this.
Another solution to overcome this issue is to install pymysql in the Anaconda prompt.
Issue: ModuleNotFoundError: No module named 'pymysql'
Solution: Installing pymysql in Anaconda Shell
Thank you,
Narasimha Rao

How to import a .ipynb file into another

I am using anaconda2 and the version of python I am running is 3.7.0
How do I import one .ipynb file into another?
I have installed a package called import_ipynb using pip and when importing the package into my notebook I get the following error:
ModuleNotFoundError: No module named 'import_ipynb'
I appreciate any help!

Importing universe

I am trying to use OpenAI and I got a import error about universe on Jupyter notebook :
import gym
import universe
No module named 'universe'
When it comes to working on terminal, it returns this error
No module named 'twisted.internet'
Then I also had install twisted with pip, I got this next error :
No module named 'ujson'
and after install ujson, I got a error No module named 'go_vncdriver' again.
I think that I will get other error again.
So which way to install is most convenient ?
Could I install all packages at once ?
préferably, using pip install.
I am using OSX and python3.6.
Try installing,
pip install go_vncdriver
And check again.

Cannot import FactorAnalyzer from module factor-analyzer-0.2.2

I installed the module factor-analyzer-0.2.2 but cannot import the function. My code is from factor_analyzer import FactorAnalyzer. I'm getting an error ModuleNotFoundError: No module named 'factor_analyzer'.
I'm using Python 3.6 and Jupyter notebook. Do you know why this does not work?
Thank you!!
I had the same problem on Mac (python3). I launch Spyder 3.3.3 via Anaconda.
In response to the following code:
from factor_analyzer import FactorAnalyzer
I received the following error:
ModuleNotFoundError: No module named 'factor_analyzer'
So, I opened Terminal (equivalent of Command Prompt on windows) and typed:
pip install factor_analyzer
Then, the problem was resolved.
Use the anaconda prompt to run the pip install factor-analyzer rather than termainal or powershell. I had the same problem and doing that solved it for me.
Can you try to run the import command on your Python Shell and let us know if you are able to import it successfully?

Error importing gspread in iPython Notebook

So I have an iPython notebook setup in Pycharm and am getting the "ImportError: No module named gspread" error thrown when I run:
import gspread
I'm running this inside a virtualenv that I have verified in PyCharm is the one being used. I pip installed gspread. I tested that I can import other modules (i.e. numpy) without issue. From the iPython command line I do not get the error when importing gspread, it is only when running it inside the iPython notebook on Pycharm.
Any idea what might be the issue? I'm stumped.

Categories