If you are using calibre source code as described here:
https://manual.calibre-ebook.com/develop.html
then you are not using your distro provided calibre. Instead uninstall it and install the calibre package your distro provides, then you will be able to use calibre.