5
votes

I "successfully" installed MySQLdb using:

pip install mysql-python

But when I use the terminal to check, "import MySQLdb" throws this error:

Traceback (most recent call last): File "", line 1, in File "//anaconda/lib/python2.7/site-packages/MySQLdb/init.py", line 19, in import _mysql ImportError: dlopen(//anaconda/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: libssl.1.0.0.dylib Referenced from: //anaconda/lib/python2.7/site-packages/_mysql.so Reason: image not found

I'm assuming this is due to some issue with linking, but I don't know what to do.

--- I'm on a Mac. ---

1
seems like you don't have libmysqlclient-dev installed, take a look here mysql-python.blogspot.in/2012/11/…Peeyush
I've installed mysql using homebrew. That worked just fine.AllieCat

1 Answers

0
votes

MYsql-python is a wrapper around MySQL client libraries. Here, you seem to lack SSL libraries. Try installing libssl (if you're on a Debian/Ubuntu/Mint)

sudo apt-get install libssl1.0.0