getkeops / keops

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

Issue with keospcore 2.0b1 KeOps_OS_Run not found #225

Closed gdurif closed 2 years ago

gdurif commented 2 years ago

When using keopscore 2.0b1 from PyPI, I get the following error:

$ pip install keopscore==2.0b1
Processing /xxx/.cache/pip/wheels/36/7a/8b/9498eb02bbbdf73cc47b0fce0a138e044695dd23c3e9c06d34/keopscore-2.0b1-py3-none-any.whl
Installing collected packages: keopscore
Successfully installed keopscore-2.0b1
$ python -c "from keopscore.utils.misc_utils import KeOps_OS_Run"
[KeOps] Warning : Cuda libraries were not detected on the system ; using cpu only mode
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'KeOps_OS_Run' from 'keopscore.utils.misc_utils' (/yyy/.pyenv/lib/python3.8/site-packages/keopscore/utils/misc_utils.py)

If I install the current version from this branch (up-to-date with the main branch), no problem:

$ pip install ./keopscore 
Processing ./keopscore
  Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for keopscore, since package 'wheel' is not installed.
Installing collected packages: keopscore
  Running setup.py install for keopscore ... done
Successfully installed keopscore-2.0b1
$ python -c "from keopscore.utils.misc_utils import KeOps_OS_Run"
[KeOps] Warning : Cuda libraries were not detected on the system ; using cpu only mode
joanglaunes commented 2 years ago

Hello @gdurif , This is normal, KeOps_OS_Run was added after the 2.0b1 release.

gdurif commented 2 years ago

Thanks @joanglaunes

Thus, the pre-release on PyPI is buggy?

gdurif commented 2 years ago

Nevermind, it works, I can run this without any error

pip install pykeops==2.0b1
python -c "import pykeops; pykeops.test_numpy_bindings()"