nucypher / nufhe

NuCypher fully homomorphic encryption (NuFHE) library implemented in Python
https://nufhe.readthedocs.io/en/latest/
GNU General Public License v3.0
441 stars 53 forks source link

syntax exception when importing #4

Closed jaylmiller closed 5 years ago

jaylmiller commented 5 years ago

after installing nufhe and the other dependencies, I get this exception when i try to import nufhe

SyntaxException: (SyntaxError) invalid syntax (<unknown>, line 4) ('i32 = dtypes.ctype(numpy.int32)\n\ndef lsh(label, sh') in file '/Users/jay/anaconda/lib/python3.5/site-packages/nufhe/transform/ntt.mako' at line: 21 char: 1

any tips?

jaylmiller commented 5 years ago

I've figured out that the reason for this issue is because the new 'f-string' syntax is being used in the file ntt.mako, which is only supported in python 3.6+.

Consider not using the f-string syntax, or specify that one needs python 3.6+, since in https://github.com/nucypher/nufhe/issues/2 you say that python 3.5+ is sufficient.

fjarri commented 5 years ago

Thanks for noticing, I based the Py3.5 estimate on the usage of type hints, but forgot about the f-strings.

Fixed in commit 4615127f2d85774 (botched the commit message, so no auto-close).