Getting db manager error from QGIS 3 on Mac?

I see the same thing. I'm using a slightly newer version than you (KyngChaos build 3.0.0-3).

I can successfully drag and drop sqlite / spatialite / GPKG from the browser panel, but not add them from Db Manager. This might be a workaround in some cases.

This appears to be a build issue with the standard Python framework on Mac OS X, rather than QGIS specifically.

  • see https://riccardo.forina.me/spatialite-for-python-does-not-work-on-osx/
  • related https://github.com/docker-library/python/issues/106

To quote the first source (emphasis mine)

You must install Python from scratch, enabling the loadable extension support at compile time.

It seems that this functionality needs to be compiled into the python framework on the mac as it's not enabled by default.

I found the same error attempting to do this in standalone python; I could get it to work with the sqlite3 from the homebrew python setup, but not the official python framework.

This is not an easy end-user change as it involves compiling a custom version of Python. The KyngChaos install pages specifically state that you should be using the standard Python framework, rather than (say) one from MacPorts or Homebrew.

Tags:

Qgis

Mac