pythonpython-3.xubuntupymysql

No module named 'pymysql'


I'm trying to use PyMySQL on Ubuntu.

I've installed pymysql using both pip and pip3 but every time I use import pymysql, it returns ImportError: No module named 'pymysql'

I'm using Ubuntu 15.10 64-bit and Python 3.5.

The same .py works on Windows with Python 3.5, but not on Ubuntu.


Solution

  • Sort of already answered this in the comments, but just so this question has an answer, the problem was resolved through running:

    sudo apt-get install python3-pymysql