Can't import annotations from __future__ Can't import annotations from __future__ python-3.x python-3.x

Can't import annotations from __future__


Looking at your error traceback, it looks like you are using python 3.5. Is that the case?

If so, then the error happens because according to PEP-563 the import of __future__ annotations is available starting with Python 3.7.

I did not find any hints that this will be backported to previous versions, but I might have missed that.