Problem solved. Thanks for the tip. I have not worked with Python yet, so I 
had to look up how to print the exception details. Doing that gave me the 

type:  <type 'exceptions.ImportError'>
value:  dlopen(/Users/ab186095/.python-eggs/MySQL_python-1.2.5-py2.7-macosx-
10.10-intel.egg-tmp/, 2): Library not loaded: libmysqlclient.
  Referenced from: /Users/ab186095/.python-eggs/MySQL_python-1.2.5-py2.7-
  Reason: image not found
['  File 
line 123, in has_modules\n    __import__(name)\n', '  File 
"build/bdist.macosx-10.10-intel/egg/MySQLdb/", line 19, in 
<module>\n', '  File "build/bdist.macosx-10.10-intel/egg/", line 
7, in <module>\n', '  File "build/bdist.macosx-10.10-intel/egg/", 
line 6, in __bootstrap__\n']

The libmysqlclient.18.dylib file was in /usr/local/mysql/lib, and 
DYLD_LIBRARY_PATH had that directory in it. That is probably enough to 
satisfy the Python console but doesn't work for the script. Then, I saw 
this post:
However, on my Mac OSX Yosemite 10.10.5, there is no /etc/ or 
ldconfig. I tried setting LD_LIBRARY_PATH and also LIBRARY_PATH to include 
/usr/loca/mysql/lib but neither worked. So I created the following links 
under /usr/local/lib:

%> ln -s ../mysql/lib/libmysqlclient.18.dylib libmysqlclient.18.dylib
%> ln -s ../mysql/lib/libmysqlclient.dylib libmysqlclient.dylib

That did the trick. I think that the MySQL installation should create these 

- Ajoy

On Sunday, September 6, 2015 at 12:32:31 PM UTC-7, Christian Hammond wrote:
> Hi,
> This usually indicates one of a few things:
> 1) The Python version/executable being used is different between the 
> console and the script.
> 2) The Python path is different between the two.
> 3) The dynamic library search path (for MySQL .so files) is different 
> between the two.
> Can you try adding some print statements to that file to check what the 
> import error looks like and to print sys.version and sys.path?
> Christian
> -- 
> Christian Hammond - <javascript:>
> Review Board -
> Beanbag, Inc. -

Supercharge your Review Board with Power Pack:
Want us to host Review Board for you? Check out RBCommons:
Happy user? Let us know!
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to