ModuleNotFoundError: No module named 'pymysql' in jupyter - python

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

Related

ModuleNotFoundError: No module named 'pytorch_tabnet.augmentations' error

I pip installed pytorch_tabnet and when i try to import the ClassificationSMOTE class existing in the package augmentations i got this error: ModuleNotFoundError: No module named 'pytorch_tabnet.augmentations'
PS: i am working with the latest version of pytorch_tabnet 3.1.1 in google colab.
from pytorch_tabnet.augmentations import ClassificationSMOTE
If the problem is that a module cannot be found, try to install the missing module into your running environment.
e.g.:
pip install git+https://github.com/dreamquark-ai/tabnet

ModuleNotFoundError: No module named 'pip' in spyder

I tried to use torch in spyder but I got error ModuleNotFoundError: No module named 'torch' so I tried use pip module not in cmd but in spyder itself following
import pip
pip.main(["install","torch"])
but got ModuleNotFoundError: No module named 'pip' and I know I had successfully used it in spyder before but recent automatic spyder updates probably have caused this error so I tried to install pip in my all python environments in cmd with cd {environment_path}but the pip was installed there. I also used python -m ensurepip in all environments but I still get ModuleNotFoundError: No module named 'pip'.
seems the problem is caused by reseting spyder(maybe there other causes) changing different python interpreters (environments) also is no help!! and installing or reinstalling with windows installer solved problem for me.
update: after restarting again many modules like 'pip', 'torch' and 'keyboard' are not recognized and reinstalling is no answer(no difference between installing for 'this user' or 'all users').

ModuleNotFoundError: No module named 'connections'

I am using pybrain library. When I import
from pybrain.structure import SigmoidLayer
I get the error
ModuleNotFoundError: No module named 'connections'
I am quite confused about the installation of pybrain. I am using python 3.6 and windows 10.
How did you install pybrain and which version of python are you using?
When i install it using pip3 and try
from pybrain.structure import SigmoidLayer
i get the same error as you, i then tried to install connections via pip3.
This fails with a syntax error in connections.
I then tried it with python2:
pip2 install pybrain connections scipy
this works.
So if you are using python2 you just need this:
pip install connections

No module named 'gspread' when trying to import gspread

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

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.

Categories