I am using python 3.4 on Lubuntu, which has by default both python2.7 and python3.4
I installed MySQLdb and am trying to use it in python3.4 using pip3
But merely import MySQLdb results in this error
Traceback (most recent call last):
File "/home/tahseen/workspace/stockproject/test.py", line 18, in <module>
import MySQLdb as mysql
File "/usr/local/lib/python3.4/dist-packages/MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: /usr/local/lib/python3.4/dist-packages/_mysql.so: undefined symbol: _Py_ZeroStruct`
Surprisingly when I use python2.7, this error does not come up