How to solve 'No module named pymysql' - python

I use computer that is Window 10 and my Python version is 3.6.
I installed pymysql and MySQLdb as in the picture below.
But When I tried to run python, I got this error : No module named 'pymysql'
also, MySQLdb...
How can I solved it?

Try to use pip3 install PyMySQL and import pymysql

Related

ModuleNotFoundError: No module named 'win32.api'

When I tried to import xlwings using import xlwings as xw, it shows the following error:
from win32.api import *
ModuleNotFoundError: No module named 'win32.api'
My environment is:
Windows 10
Python 3.10
IDE: PyCharm
Does anyone know how to fix it?
You probably don't have the pywin32 module installed.
Try pip install pywin32 and check this question

Pycharm not finding module installed (dnspython) in venv [duplicate]

I want to check MX-Record from Python. So I installed the dnspython package, but when I try to import following library:
import dns.resolver
It shows the following error:
ModuleNotFoundError: No module named 'dns'.
I use PyCharm and Python 3.
You should install https://github.com/rthalley/dnspython first
pip install dnspython

ModuleNotFoundError: No module named 'pycoin'

Code:
from pycoin.ecdsa.secp256k1 import secp256k1_generator
When I run this, I get the error:
ModuleNotFoundError: No module named 'pycoin'
I've tried doing:
pip3 install pycoin
aswell as
pip install pycoin
Both of which have lead to the same error.
I've ran the code on python and python3 which also leads to the same error.
Any solutions?
Go to terminal or cmd on windows and type python3 (python2, python for older versions)
Then try to import the module there.
If the module in imported successfully then reopen your IDE. and then try.

Python not finding MySQLdb on OSX..?

Using pip I installed mysql-python, got:
Successfully installed MySQL-python-1.2.5
However when I try to import MySQLdb I get:
ImportError: No module named MySQLdb
locate MySQLdb gives me:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQLdb
Why is Python not finding the module?
Thanks!
Gil.

Django. ImportError: No module named unicodedata

Today I was tried start my python web project by python manage.py runserver
and get error:
ImportError: No module named unicodedata
When I tried to find solution of my problem I get some another errors.
I try pip install unicodedata and get
Fatal error in launcher: Unable to create process using '"'
Then I try python -m pip install unicodedata
LookupError: unknown encoding: idna
So I try >>>import encodings.idna but have error again:
ImportError: No module named unicodedata
My python: 2.7.12.
I tried to reinstall it, but it's did not help me
So, this is my problem.
Did you try to import unicodedata2?
Then do import unicode. It works for me.
I did not solved this problem with python 2.7.12 and try to install python 3.6.1. Now it's working correctly.

Categories

Resources