I tried importing the MySQLdb within iPython and received the following error.
ImportError Traceback (most recent call last)
<ipython-input-4-f5538763dbdb> in <module>()
----> 1 import MySQLdb as mdb
2 import sys
/Users/user1/anaconda/lib/python2.7/site-packages/MySQLdb/__init__.py in <module>()
17 from MySQLdb.release import __version__, version_info, __author__
18
---> 19 import _mysql
20
21 if version_info != _mysql.version_info:
ImportError: dlopen(/Users/user1/anaconda/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: libssl.1.0.0.dylib
Referenced from: /Users/user1/anaconda/lib/python2.7/site-packages/_mysql.so
Reason: image not found
I found a few posts on Stackoverflow of a similar nature, where it was suggested that the System Integrity Protection should be disabled, which I have now.
I also edited my bashprofile as suggested for OSX El Capitan in this post, Python mysqldb: Library not loaded: libmysqlclient.18.dylib but I still haven't been able to overcome this issue.
A little more information incase it helps diagnose the issue:
- Python version: Python 2.7.10 |Anaconda 2.4.0 (x86_64)| (default, Oct 19 2015, 18:31:17) [GCC 4.2.1 (Apple Inc. build 5577)]
- Result of 'which python' : /Users/user1/anaconda/bin/python
- MySQL Version installed: mysql-5.7.10
- MySQL-Python version: MySQL-python-1.2.5
Where am I going wrong?