Problems with GPGME1.8 and Python 3.5 bindings

Justus Winter justus at
Mon Feb 13 11:46:01 CET 2017

Hi :)

Jean-François Schaff <jfschaff at> writes:

> I'm new to gpg, and trying to use the Python bindings included in
> PGPME. I'm using Ubuntu 16.04 LTS.
> I have done the following things:
> - compiled and installed gpgme-1.8.0
> Everything seems to build and install as expected, but when I finally
> try to use the python package (import gpg) I get the following error:
> (venv) jfs at Danube-linux:~/webdev/mms$ python
> Python 3.5.2 (default, Nov 17 2016, 17:05:23)
> [GCC 5.4.0 20160609] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import gpg
> Traceback (most recent call last):
> ImportError: /home/jfs/webdev/mms/venv/local/lib/python3.5/site-packages/gpg/
> symbol gpgme_pubkey_algo_string, version GPGME_1.1 not defined in file
> with link time reference

gpgme_pubkey_algo_string is new in GPGME 1.7.  This suggests that the
version 1.8 that you built is not picked up.  How you resolve that is
really up to you and your needs.  You could for example add the
$your_install_prefix/lib to LD_LIBRARY_PATH in your bin/activate script.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: </pipermail/attachments/20170213/4ffe941e/attachment.sig>

More information about the Gnupg-users mailing list