开发者

MySQLdb problem with Django and PyDev

I built my project with Django in Pydev. Every thing is working well. Now I configured PyDev to debug the project by add开发者_如何学JAVAing runserver 8001--noreload When I sent the Database engin to sqlite3 every thing is ok and I can debug the project. When I put the database engin to MySQL (my real DB) and try to debug, I get : django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: DLL load failed: The specified module could not be found.

Please any help to resolve this problem. I installed the MySQLdb driver to my windows. When I run the project normally it works, only I get this problem with Debuging.

Thanks


In the Debug Configurations window, go to the Environment tab and add the following environment variable:

variable: DYLD_LIBRARY_PATH value: /usr/local/mysql/lib

And that's it.


I noticed in Window -> Preferencs -> Pydev - Interpreter -> Libraries that... it said: C:\Python26\lib\site-packages when it actually says: C:\Python26\Lib\site-packages Lib instead of lib! Then it worked perfectly :) Finally MySQLdb has code completion.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜