aidos-lab / pytorch-topological

A topological machine learning framework based on PyTorch
https://pytorch-topological.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
142 stars 18 forks source link

pip installation issue #32

Closed cordy5134 closed 9 months ago

cordy5134 commented 9 months ago

Hi, I was trying to install pytorch-topological using 'pip install torch-topological' command but I got the error messages below:

Collecting torch-topological
  Using cached torch_topological-0.1.7-py3-none-any.whl (51 kB)
Collecting POT<0.9.0,>=0.8.0 (from torch-topological)
  Using cached POT-0.8.2.tar.gz (255 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
INFO: pip is looking at multiple versions of torch-topological to determine which version is compatible with other requirements. This could take a while.
Collecting torch-topological
  Using cached torch_topological-0.1.6-py3-none-any.whl (51 kB)
  Using cached torch_topological-0.1.5-py3-none-any.whl (50 kB)
  Using cached torch_topological-0.1.4-py3-none-any.whl (325 kB)
  Using cached torch_topological-0.1.3-py3-none-any.whl (323 kB)
  Using cached torch_topological-0.1.2-py3-none-any.whl (316 kB)
  Using cached torch_topological-0.1.1-py3-none-any.whl (38 kB)
  Using cached torch_topological-0.1.0-py3-none-any.whl (9.2 kB)
INFO: pip is still looking at multiple versions of torch-topological to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install torch-topological==0.1.0, torch-topological==0.1.1, torch-topological==0.1.2, torch-topological==0.1.3, torch-topological==0.1.4, torch-topological==0.1.5, torch-topological==0.1.6 and torch-topological==0.1.7 because these package versions have conflicting dependencies.

The conflict is caused by:
    torch-topological 0.1.7 depends on giotto-ph<0.3.0 and >=0.2.0
    torch-topological 0.1.6 depends on giotto-ph<0.3.0 and >=0.2.0
    torch-topological 0.1.5 depends on giotto-ph<0.3.0 and >=0.2.0
    torch-topological 0.1.4 depends on giotto-ph<0.3.0 and >=0.2.0
    torch-topological 0.1.3 depends on giotto-ph<0.3.0 and >=0.2.0
    torch-topological 0.1.2 depends on giotto-ph<0.3.0 and >=0.2.0
    torch-topological 0.1.1 depends on giotto-ph<0.3.0 and >=0.2.0
    torch-topological 0.1.0 depends on giotto-ph<0.3.0 and >=0.2.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

I'm currently using a python 3.11 environment, is this a compatibility issue or I need to do some extra settings? Thanks for the help!

Pseudomanifold commented 9 months ago

Hi! That might be a versioning restriction with giotto. Can you try what happens if you clone this repository and change the version requirements in pyproject.toml?

cordy5134 commented 9 months ago

After some searching it seems that it's a compatibility issue with giotto-ph and python 3.11 as I only find support for 3.10 in their repo. And finally I installed the package successfully using a new 3.10 environment. Thank you for the help and fast reply!

Pseudomanifold commented 9 months ago

Sure, thanks a lot! I'll check for 3.11 support, though, because that would certainly be nice to have!