MySQL and Python - "image not found" -- permanent fix?
Assuming you're just using the default terminal, you could put the command in your .bash_profile/.bashrc by running something like
echo "export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/" >> ~/.bash_profile
Switching .bash_profile with your equivalent.Then when you start a new terminal it should already be applied. To apply it immediately just run
source ~/.bash_profile
Everytime I try to run a django app in terminal using a python manage.py runserver command I get the following error:
Referenced from: /Users/myname/anaconda/lib/python2.7/site-packages/_mysql.so
  Reason: image not found.
Did you install mysqlclient or MySQL-python?

To fix it, I just paste
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/

into my terminal. How can I rearrange my files so that I don't have to paste this in every time? I am working on a Mac.