getkeops / keops

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

pykeops/cmake_scripts/script_keops_formula//formula.h.in not found #152

Closed fwilliams closed 3 years ago

fwilliams commented 3 years ago

When using the latest build of KeOps (from Github commit b5eb4f2). I get the error

FileNotFoundError: [Errno 2] No such file or directory: '/opt/conda/lib/python3.8/site-packages/pykeops/cmake_scripts/script_keops_formula//formula.h.in'

I installed keops via

git clone --recursive git@github.com:getkeops/keops.git
cd keops
pip install .

but it also seems to happen if you install from github directly with

pip install git+https://github.com/getkeops/keops.git

The full relevant stack trace for the error is:

 File "/opt/conda/lib/python3.8/site-packages/pykeops/torch/operations.py", line 486, in __call__
    return KernelSolveAutograd.apply(
  File "/opt/conda/lib/python3.8/site-packages/pykeops/torch/operations.py", line 51, in forward
    myconv = LoadKeOps(
  File "/opt/conda/lib/python3.8/site-packages/pykeops/common/keops_io.py", line 48, in __init__
    self._safe_compile()
  File "/opt/conda/lib/python3.8/site-packages/pykeops/common/utils.py", line 75, in wrapper_filelock
    func_res = func(*args, **kwargs)
  File "/opt/conda/lib/python3.8/site-packages/pykeops/common/keops_io.py", line 55, in _safe_compile
    compile_generic_routine(
  File "/opt/conda/lib/python3.8/site-packages/pykeops/common/compile_routines.py", line 241, in compile_generic_routine
    build_keops_formula_object_file(
  File "/opt/conda/lib/python3.8/site-packages/pykeops/common/compile_routines.py", line 188, in build_keops_formula_object_file
    create_keops_include_file(
  File "/opt/conda/lib/python3.8/site-packages/pykeops/common/compile_routines.py", line 118, in create_keops_include_file
    shutil.copyfile(template_include_file, target_include_file)
  File "/opt/conda/lib/python3.8/shutil.py", line 261, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/conda/lib/python3.8/site-packages/pykeops/cmake_scripts/script_keops_formula//formula.h.in'

It seems like these files are might not be properly copied in setup.py.

joanglaunes commented 3 years ago

Thank you @fwilliams for this update !