Skip to content

Error on import pykeops: Unable to find file. #442

@johnsoltis

Description

@johnsoltis

Hello,

I have been struggling to install and get pykeops to run. I encounter the error below whenever I try to run 'import pykeops'.

Traceback (most recent call last):
File "/home/jsoltis/cuda_test.py", line 7, in
import pykeops
File "/home/jsoltis/miniforge3/envs/gpu_env/lib/python3.10/site-packages/pykeops/init.py", line 2, in
import keopscore
File "/home/jsoltis/miniforge3/envs/gpu_env/lib/python3.10/site-packages/keopscore/init.py", line 14, in
from keopscore.config import *
File "/home/jsoltis/miniforge3/envs/gpu_env/lib/python3.10/site-packages/keopscore/config/init.py", line 10, in
cuda_config = CUDAConfig()
File "/home/jsoltis/miniforge3/envs/gpu_env/lib/python3.10/site-packages/keopscore/config/cuda.py", line 56, in init
self.set_use_cuda()
File "/home/jsoltis/miniforge3/envs/gpu_env/lib/python3.10/site-packages/keopscore/config/cuda.py", line 146, in set_use_cuda
self.get_cuda_include_path()
File "/home/jsoltis/miniforge3/envs/gpu_env/lib/python3.10/site-packages/keopscore/config/cuda.py", line 329, in get_cuda_include_path
cuda_h_path = self.get_include_file_abspath("cuda.h")
File "/home/jsoltis/miniforge3/envs/gpu_env/lib/python3.10/site-packages/keopscore/config/cuda.py", line 344, in get_include_file_abspath
tmp_file = tempfile.NamedTemporaryFile(dir=self.get_build_folder()).name
File "/home/jsoltis/miniforge3/envs/gpu_env/lib/python3.10/tempfile.py", line 575, in NamedTemporaryFile
file = _io.open(dir, mode, buffering=buffering,
File "/home/jsoltis/miniforge3/envs/gpu_env/lib/python3.10/tempfile.py", line 572, in opener
fd, name = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "/home/jsoltis/miniforge3/envs/gpu_env/lib/python3.10/tempfile.py", line 256, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
FileNotFoundError: [Errno 2] No such file or directory: '/home/jsoltis/.cache/keops2.3/Linux_exp-9-58_4.18.0-513.24.1.el8_9.x86_64_p3.10.20_CUDA_VISIBLE_DEVICES_0/tmpych3azll'

Attached is a copy of the environment file: gpu_env.yml

Torch is able to detect the GPU correctly. I tried a variant of the environment where I also installed cmake in addition to the other files (i.e., conda install conda-forge::cmake), but that gave the exact same error.

Any help would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions