$ python3
Python 3.5.2 (default, Sep 3 2016, 11:46:47)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import keepkeylib.transport_hid
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.5/site-packages/keepkeylib/transport_hid.py", line 5, in
from .transport import Transport, ConnectionError
File "/usr/local/lib/python3.5/site-packages/keepkeylib/transport.py", line 2, in
from . import mapping
File "/usr/local/lib/python3.5/site-packages/keepkeylib/mapping.py", line 1, in
from . import messages_pb2 as proto
File "/usr/local/lib/python3.5/site-packages/keepkeylib/messages_pb2.py", line 12, in
import types_pb2
ImportError: No module named 'types_pb2'
The main problem is the generated messages_pb2 is apparently generated with google protobuf for Python2. If you fix the import with "from . import" you then run into unicode errors.
Probably best to create two messages_pb2 and conditionally import based on the python version?
$ python3
Python 3.5.2 (default, Sep 3 2016, 11:46:47)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
The main problem is the generated messages_pb2 is apparently generated with google protobuf for Python2. If you fix the import with "from . import" you then run into unicode errors.
Probably best to create two messages_pb2 and conditionally import based on the python version?