import MySQLdb
leads to
Traceback (most recent call last):
File \"\", line 1, in
File \"build/bdist
So, from what I can tell, the @rpath tries to resolve to /usr/lib, which can't be written to. I resolved this by crawling through this site. A lot of it is in Chinese, but what I got was the command sudo install_name_tool -change @rpath/libmysqlclient.21.dylib /usr/local/mysql/lib/libmysqlclient.21.dylib /Users/[username]/.pyenv/versions/career/lib/python2.7/site-packages/_mysql.so