PyNaCl failed to import SealedBox

145 Views Asked by At

My code fails with this line: from nacl.public import PrivateKey, SealedBox

I got this error: ImportError: cannot import name 'SealedBox'

I am using Python 3.6. Anyone has any idea how this happen?

1

There are 1 best solutions below

1
On

What's your version of PyNaCl? According to the Changelog in https://pypi.python.org/pypi/PyNaCl/1.2.0 the SealedBox support was introduced in 1.2.0. Maybe your version is older than that.

Changelog 1.2.0 - 2017-11-01 [...]

Added support for SealedBox construction.