ImportError: No module named zymkey

Completed install. 3sec LED is flashing. Attempted to run test scripts and encountered error. Attempted to manually install module and it failed.

How do I install the python module zymkey?

python /usr/local/share/zymkey/examples/
Traceback (most recent call last):
File “”, lwine 1, in
import zymkey
ImportError: No module named zymkey

sudo pip install zymkey
Collecting zymkey

python /usr/local/share/zymkey/examples/
Traceback (most recent call last):
File “/usr/local/share/zymkey/examples/”, line 1, in
import zymkey
File “/usr/local/lib/python2.7/dist-packages/zymkey/”, line 3, in
from .module import Zymkey
File “/usr/local/lib/python2.7/dist-packages/zymkey/”, line 50, in
raise ZymkeyLibraryError(‘unable to find {}, checked {}’.format(os.path.basename(ZYMKEY_LIBRARY_PATH), prefixes))
zymkey.exceptions.ZymkeyLibraryError: unable to find, checked [’/usr/lib/python2.7/dist-packages/usr/local/lib’, ‘/usr/local/lib’]

Please close the ticket. I have found a solution but not a cause. I am answering my own message post.

I tried the zymbit software install on another Pi and the zymkey error didn’t occur. I did another complete Pi and zymbit install and the error appeared again.

After I encountered the error, I ran the zymbit install a second time. The output from the install didn’t enlighten me because it found all the software components it was trying to install. When I ran the python scripts they worked.

I have the output from the failed install (i.e. zymkey error) and the output after the second run if this is of value.

The ironic part is the install has worked sometimes without having to run the install twice. I can’t figure out what is missing to cause this to happen.

If you get the zymkey module error just try running the zymkey install a second time and see if it provides you success.


@colporteur - which version/release of Raspian are you using ? (we think it could be version related…)

Sorry for the delay. I have been away from my lab. Raspbian Stretch Lite 2019-04-08


I had an epiphany and tried another version of python. No success:)

python3 /usr/local/share/zymkey/examples/
Exception ignored in: <bound method Zymkey.del of <zymkey.module.Zymkey object at 0x769ee1d0>>
Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/zymkey/”, line 74, in del
raise AssertionError(‘bad return code {!r}’.format(ret))
AssertionError: bad return code -1
Testing data lock…
Traceback (most recent call last):
File “/usr/local/share/zymkey/examples/”, line 6, in
dst = zymkey.client.lock(src)
AttributeError: ‘NoneType’ object has no attribute ‘lock’