When using py2exe, PyQt application cannot load SQlite database

 ̄綄美尐妖づ 提交于 2019-12-01 12:16:55

DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far ...

The accepted answer doesn't really say what dlls they copied and in what places. I managed to fix it by copying the driver inside the sqldrivers directory relative to where the exe and qt dlls are (I'm using PySide but should work with PyQt4 as well). In setup.py:

setup(
    ...,
    data_files = [('sqldrivers', ('C:\Python27\Lib\site-packages\PySide\plugins\sqldrivers\qsqlite4.dll',))],
    ...,
)

I solved it!

I had a really clever way to avoid making my users install vcredist--I copied the manifest and the DLLs into two places and all the errors about the MS DLLs went away. That's when I started trying to figure out this SQLite driver error.

I wasn't as smart as I thought. If I install vcredist all the "Driver Not Loaded" and "No SQL drivers found" errors go away. Arg.

Try to re-install SOLite, or verify if you have putted the DLL in the correct place, because i remember that the MySQL DLL have to be in System32 directory to develop something that uses it.

Regards.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!