geometric-kernels / GeometricKernels

Geometric kernels on manifolds, meshes and graphs
https://geometric-kernels.github.io/
Apache License 2.0
218 stars 18 forks source link

cannot install on ubuntu 22.04 LTS #127

Closed ctr closed 6 months ago

ctr commented 7 months ago

Please could you help me install GeometricKernels on ubuntu 22.04 LTS. I think there is an issue with the name and version numbering of the Spherical-Harmonics dependency (which was updated 5 days ago to a new version).

I also tried installing Spherical-Harmonics from the git commit just before the latest version number bump but that didn't satisfy the dependency requirement for GeometricKernels.

Any help would be much appreciated.

Chris.

(gp) ctr28@ctr28:~/x$ pip install git+https://github.com/gpflow/geometrickernels.git
Collecting git+https://github.com/gpflow/geometrickernels.git
  Cloning https://github.com/gpflow/geometrickernels.git to /tmp/pip-req-build-cqsvg4eq
  Running command git clone --filter=blob:none --quiet https://github.com/gpflow/geometrickernels.git /tmp/pip-req-build-cqsvg4eq
  Resolved https://github.com/gpflow/geometrickernels.git to commit d5f39b7882a859b8bf7d51fe259baea264b5e5dd
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting spherical-harmonics@ git+https://github.com/vdutor/SphericalHarmonics.git (from GeometricKernels==0.1a0)
  Cloning https://github.com/vdutor/SphericalHarmonics.git to /tmp/pip-install-t9irwm7z/spherical-harmonics_86ac447b732c439bbfb2087028a8481e
  Running command git clone --filter=blob:none --quiet https://github.com/vdutor/SphericalHarmonics.git /tmp/pip-install-t9irwm7z/spherical-harmonics_86ac447b732c439bbfb2087028a8481e
  Resolved https://github.com/vdutor/SphericalHarmonics.git to commit a388422110ee23b2403f3859c4d0be9053047f3b
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  WARNING: Generating metadata for package spherical-harmonics produced metadata for project name sphericalharmonics. Fix your #egg=spherical-harmonics fragments.
Discarding git+https://github.com/vdutor/SphericalHarmonics.git: Requested sphericalharmonics from git+https://github.com/vdutor/SphericalHarmonics.git (from GeometricKernels==0.1a0) has inconsistent name: expected 'spherical-harmonics', but metadata has 'sphericalharmonics'
Requirement already satisfied: numpy>=1.16 in /home/ctr28/anaconda3/envs/gp/lib/python3.12/site-packages (from GeometricKernels==0.1a0) (1.26.4)
Requirement already satisfied: scipy>=1.3 in /home/ctr28/anaconda3/envs/gp/lib/python3.12/site-packages (from GeometricKernels==0.1a0) (1.13.0)
Collecting plum-dispatch==1.7.4 (from GeometricKernels==0.1a0)
  Using cached plum_dispatch-1.7.4-py3-none-any.whl.metadata (1.8 kB)
Collecting backends==1.4.32 (from GeometricKernels==0.1a0)
  Using cached backends-1.4.32.tar.gz (81 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting potpourri3d (from GeometricKernels==0.1a0)
  Using cached potpourri3d-1.0.0.tar.gz (1.4 MB)
  Preparing metadata (setup.py) ... done
Collecting robust-laplacian (from GeometricKernels==0.1a0)
  Using cached robust_laplacian-0.2.7.tar.gz (1.3 MB)
  Preparing metadata (setup.py) ... done
Collecting meshzoo (from GeometricKernels==0.1a0)
  Using cached meshzoo-0.11.4-py3-none-any.whl.metadata (9.7 kB)
Requirement already satisfied: opt-einsum in /home/ctr28/anaconda3/envs/gp/lib/python3.12/site-packages (from GeometricKernels==0.1a0) (3.3.0)
Collecting geomstats (from GeometricKernels==0.1a0)
  Using cached geomstats-2.7.0-py3-none-any.whl.metadata (15 kB)
Collecting einops (from GeometricKernels==0.1a0)
  Using cached einops-0.7.0-py3-none-any.whl.metadata (13 kB)
INFO: pip is looking at multiple versions of geometrickernels to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement spherical-harmonics (unavailable) (from geometrickernels) (from versions: 0.0.0, 0.0.1, 0.0.2, 0.0.3)
ERROR: No matching distribution found for spherical-harmonics (unavailable)
(gp) ctr28@ctr28:~/x$ pip install git+https://github.com/vdutor/SphericalHarmonics.git ae700e1abc323446f8e495bc888f01c4fdd12410
Collecting git+https://github.com/vdutor/SphericalHarmonics.git
  Cloning https://github.com/vdutor/SphericalHarmonics.git to /tmp/pip-req-build-qwp_9rc4
  Running command git clone --filter=blob:none --quiet https://github.com/vdutor/SphericalHarmonics.git /tmp/pip-req-build-qwp_9rc4
  Resolved https://github.com/vdutor/SphericalHarmonics.git to commit a388422110ee23b2403f3859c4d0be9053047f3b
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
ERROR: Could not find a version that satisfies the requirement ae700e1abc323446f8e495bc888f01c4fdd12410 (from versions: none)
ERROR: No matching distribution found for ae700e1abc323446f8e495bc888f01c4fdd12410
(gp) ctr28@ctr28:~/x$ pip install git+https://github.com/vdutor/SphericalHarmonics.git@ae700e1abc323446f8e495bc888f01c4fdd12410
Collecting git+https://github.com/vdutor/SphericalHarmonics.git@ae700e1abc323446f8e495bc888f01c4fdd12410
  Cloning https://github.com/vdutor/SphericalHarmonics.git (to revision ae700e1abc323446f8e495bc888f01c4fdd12410) to /tmp/pip-req-build-sjc4e0du
  Running command git clone --filter=blob:none --quiet https://github.com/vdutor/SphericalHarmonics.git /tmp/pip-req-build-sjc4e0du
  Running command git rev-parse -q --verify 'sha^ae700e1abc323446f8e495bc888f01c4fdd12410'
  Running command git fetch -q https://github.com/vdutor/SphericalHarmonics.git ae700e1abc323446f8e495bc888f01c4fdd12410
  Running command git checkout -q ae700e1abc323446f8e495bc888f01c4fdd12410
  Resolved https://github.com/vdutor/SphericalHarmonics.git to commit ae700e1abc323446f8e495bc888f01c4fdd12410
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in /home/ctr28/anaconda3/envs/gp/lib/python3.12/site-packages (from Spherical-Harmonics==0.0.2) (1.26.4)
Requirement already satisfied: scipy in /home/ctr28/anaconda3/envs/gp/lib/python3.12/site-packages (from Spherical-Harmonics==0.0.2) (1.13.0)
Building wheels for collected packages: Spherical-Harmonics
  Building wheel for Spherical-Harmonics (pyproject.toml) ... done
  Created wheel for Spherical-Harmonics: filename=Spherical_Harmonics-0.0.2-py3-none-any.whl size=2903029 sha256=c04b38775d4c04f1be28282d05b532aff09ca35592a7ee325f7ca1cf22b947d7
  Stored in directory: /home/ctr28/.cache/pip/wheels/10/ac/93/6db39ccaf3caaea5b2ee9d437722011e4eebd892ed228a21ac
Successfully built Spherical-Harmonics
Installing collected packages: Spherical-Harmonics
Successfully installed Spherical-Harmonics-0.0.2
(gp) ctr28@ctr28:~/x$ pip install git+https://github.com/gpflow/geometrickernels.git
Collecting git+https://github.com/gpflow/geometrickernels.git
  Cloning https://github.com/gpflow/geometrickernels.git to /tmp/pip-req-build-yv3b1xbf
  Running command git clone --filter=blob:none --quiet https://github.com/gpflow/geometrickernels.git /tmp/pip-req-build-yv3b1xbf
  Resolved https://github.com/gpflow/geometrickernels.git to commit d5f39b7882a859b8bf7d51fe259baea264b5e5dd
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting spherical-harmonics@ git+https://github.com/vdutor/SphericalHarmonics.git (from GeometricKernels==0.1a0)
  Cloning https://github.com/vdutor/SphericalHarmonics.git to /tmp/pip-install-hywi1kab/spherical-harmonics_e6173961984542c8ab35607a54ec6000
  Running command git clone --filter=blob:none --quiet https://github.com/vdutor/SphericalHarmonics.git /tmp/pip-install-hywi1kab/spherical-harmonics_e6173961984542c8ab35607a54ec6000
  Resolved https://github.com/vdutor/SphericalHarmonics.git to commit a388422110ee23b2403f3859c4d0be9053047f3b
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  WARNING: Generating metadata for package spherical-harmonics produced metadata for project name sphericalharmonics. Fix your #egg=spherical-harmonics fragments.
Discarding git+https://github.com/vdutor/SphericalHarmonics.git: Requested sphericalharmonics from git+https://github.com/vdutor/SphericalHarmonics.git (from GeometricKernels==0.1a0) has inconsistent name: expected 'spherical-harmonics', but metadata has 'sphericalharmonics'
Requirement already satisfied: numpy>=1.16 in /home/ctr28/anaconda3/envs/gp/lib/python3.12/site-packages (from GeometricKernels==0.1a0) (1.26.4)
Requirement already satisfied: scipy>=1.3 in /home/ctr28/anaconda3/envs/gp/lib/python3.12/site-packages (from GeometricKernels==0.1a0) (1.13.0)
Collecting plum-dispatch==1.7.4 (from GeometricKernels==0.1a0)
  Using cached plum_dispatch-1.7.4-py3-none-any.whl.metadata (1.8 kB)
Collecting backends==1.4.32 (from GeometricKernels==0.1a0)
  Using cached backends-1.4.32.tar.gz (81 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting potpourri3d (from GeometricKernels==0.1a0)
  Using cached potpourri3d-1.0.0.tar.gz (1.4 MB)
  Preparing metadata (setup.py) ... done
Collecting robust-laplacian (from GeometricKernels==0.1a0)
  Using cached robust_laplacian-0.2.7.tar.gz (1.3 MB)
  Preparing metadata (setup.py) ... done
Collecting meshzoo (from GeometricKernels==0.1a0)
  Using cached meshzoo-0.11.4-py3-none-any.whl.metadata (9.7 kB)
Requirement already satisfied: opt-einsum in /home/ctr28/anaconda3/envs/gp/lib/python3.12/site-packages (from GeometricKernels==0.1a0) (3.3.0)
Collecting geomstats (from GeometricKernels==0.1a0)
  Using cached geomstats-2.7.0-py3-none-any.whl.metadata (15 kB)
Collecting einops (from GeometricKernels==0.1a0)
  Using cached einops-0.7.0-py3-none-any.whl.metadata (13 kB)
INFO: pip is looking at multiple versions of geometrickernels to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement spherical-harmonics (unavailable) (from geometrickernels) (from versions: 0.0.0, 0.0.1, 0.0.2, 0.0.3)
ERROR: No matching distribution found for spherical-harmonics (unavailable)
(gp) ctr28@ctr28:~/x$ 
stoprightthere commented 7 months ago

Hi Chris,

Thanks for the interest in our lib! Sorry for the frustrating installation experience though.

We are currently working on a new, improved GeometricKernels with more spaces, features and some bug-fixes! In fact, we are preparing to release it very soon, so if you can wait for a couple of days, these issues will go away.

Alternatively, you can have a peek at the new version at the devel branch. This is compatible with the new SphericalHarmonics. The downside is, we are currently working on it, so it is subject to change, and there might be some inconsistencies in the docs. You can do it via pip install git+https://github.com/gpflow/geometrickernels.git@devel.

The third option is to clone the repository on the main branch and replace the requirement spherical-harmonics with SphericalHarmonics manually. Wouldn't recommend this route because this version is soon to be obsolete.

Thanks!

ctr commented 7 months ago

Thanks for the quick response. I tried your third option to get going. Now pip install completes.

But I get an error running the example script.

What should I try next?

(gp) ctr28@ctr28:~/x/geometrickernels$ python example1.py Traceback (most recent call last): File "/home/ctr28/x/geometrickernels/example1.py", line 8, in <module> from geometric_kernels.spaces.hypersphere import Hypersphere File "/home/ctr28/x/geometrickernels/geometric_kernels/spaces/__init__.py", line 6, in <module> from geometric_kernels.spaces.circle import Circle File "/home/ctr28/x/geometrickernels/geometric_kernels/spaces/circle.py", line 6, in <module> import geomstats as gs File "/home/ctr28/anaconda3/envs/gp/lib/python3.12/site-packages/geomstats/__init__.py", line 7, in <module> import geomstats.geometry.discrete_curves File "/home/ctr28/anaconda3/envs/gp/lib/python3.12/site-packages/geomstats/geometry/discrete_curves.py", line 11, in <module> import geomstats.backend as gs ModuleNotFoundError: No module named 'geomstats.backend' (gp) ctr28@ctr28:~/x/geometrickernels$

vabor112 commented 7 months ago

Hi Chris,

I think you get this because geomstats - and thus GeometricKernels as well - do not support Python 3.12. You may have better luck with, say, Python 3.10. This will be so even for the new release we are preparing, again, because of our geomstats dependency.

Also, I would really recommend you consider @stoprightthere's options one or two. The devel branch should be more robust now than the main, simply because the main hasn't been updated for a while. Also devel has nice Jupyter notebooks to get you started with GeometricKernels!

stoprightthere commented 6 months ago

Closing this, since we've just released the new version.