Skip to content Skip to sidebar Skip to footer

Error No Module Named "pymysql" Windows 10

i have problem to try pymysql. my computer is using windows 10 use python 3.5 i have installed pymysql via pip install pymsql and success, no error. i have checked with pip list

Solution 1:

step-1 :Uninstall the existing pymysql by using the command

pip uninstall PyMySQL

step-2 : Install the pymysql by using the command pip3

pip3 install PyMySQL

step-3: import pymysql

This should work. I am using python3.4 in windows 8 when I tried to import pymysql using the command import PyMySQL it didn't work, but after performing the above steps then I tried import pymysql then it worked perfectly.

Solution 2:

The name of the import doesn't need to be the same as the project. Use:

import pymysql

See: https://github.com/PyMySQL/PyMySQL/blob/master/example.py

Also, you can't use any python if I understand correctly. The requirements posted https://github.com/PyMySQL/PyMySQL#installation:

Requirements Python -- one of the following: CPython >= 2.6 or >= 3.3

PyPy >= 4.0

IronPython 2.7 MySQL Server -- one of the following: MySQL> >= 4.1 (tested with only 5.5~) MariaDB >= 5.1

Solution 3:

If even sudo apt-get install python3-pymysql or pip3 install pymysql does not work for you then go to PyMySQL page.https://github.com/PyMySQL/PyMySQL, download the zip file,extract it, cd to that location and type python setup.py install. This worked like a charm for me.

Post a Comment for "Error No Module Named "pymysql" Windows 10"