Problems with GPGME1.8 and Python 3.5 bindings

Jean-François Schaff jfschaff at gmail.com
Wed Feb 8 12:52:27 CET 2017


Hi,

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 libgpg-error-1.26
- compiled and installed libassuan-2.4.3
- installed swig2.0 (sudo apt-get install swig2.0)
- installed python3-dev package (sudo apt-get install python3-dev)
- 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):
  File "<stdin>", line 1, in <module>
  File "/home/jfs/webdev/mms/venv/local/lib/python3.5/site-packages/gpg/__init__.py",
line 101, in <module>
    from . import core
  File "/home/jfs/webdev/mms/venv/local/lib/python3.5/site-packages/gpg/core.py",
line 34, in <module>
    from . import gpgme
  File "/home/jfs/webdev/mms/venv/local/lib/python3.5/site-packages/gpg/gpgme.py",
line 28, in <module>
    _gpgme = swig_import_helper()
  File "/home/jfs/webdev/mms/venv/local/lib/python3.5/site-packages/gpg/gpgme.py",
line 24, in swig_import_helper
    _mod = imp.load_module('_gpgme', fp, pathname, description)
  File "/home/jfs/webdev/mms/venv/lib/python3.5/imp.py", line 242, in
load_module
    return load_dynamic(name, filename, file)
  File "/home/jfs/webdev/mms/venv/lib/python3.5/imp.py", line 342, in
load_dynamic
    return _load(spec)
ImportError: /home/jfs/webdev/mms/venv/local/lib/python3.5/site-packages/gpg/_gpgme.cpython-35m-x86_64-linux-gnu.so:
symbol gpgme_pubkey_algo_string, version GPGME_1.1 not defined in file
libgpgme.so.11 with link time reference
>>>

Am I doing something wrong?

Note that I'm running that in the virtual environment, not sure if
that could be related...

Any help would be greatly appreciated :-)

Jean-François Schaff



More information about the Gnupg-users mailing list