getkeops / keops

KErnel OPerationS, on CPUs and GPUs, with autodiff and without memory overflows
https://www.kernel-operations.io
MIT License
1.02k stars 65 forks source link

invalid syntax "from pykeops.torch import LazyTensor" #363

Closed lindafei01 closed 3 months ago

lindafei01 commented 3 months ago

Hi, I am using pykeops==2.2.1 and encountered the invalid syntax error when using “from pykeops.torch import LazyTensor”. The traceback is as below:

File "/home/Projects/processing.py", line 4, in from pykeops.torch import LazyTensor File "/home/miniconda3/envs/pi/lib/python3.7/site-packages/pykeops/init.py", line 77, in from .torch.test_install import test_torch_bindings File "/home/ miniconda3/envs/pi/lib/python3.7/site-packages/pykeops/torch/init.py", line 17, in from .generic.generic_red import Genred File "/home/miniconda3/envs/pi/lib/python3.7/site-packages/pykeops/torch/generic/generic_red.py", line 263 return None, *grads ^ SyntaxError: invalid syntax

jeanfeydy commented 3 months ago

Hi @lindafei01 ,

Thanks for your interest in our library! As explained in #356, this issue is due to Python 3.7: please update to e.g. Python 3.8 and the error should disappear. I have just added an explicit requirement in the Python package and in the documentation (we should have done this earlier), the fix will be applied when we release our next version.

Best regards, Jean