openmm / NNPOps

High-performance operations for neural network potentials
Other
79 stars 17 forks source link

Cannot install NNPops via conda #117

Closed BenCree closed 3 months ago

BenCree commented 3 months ago

Hi,

When trying to install NNPops via conda/mamba I get a strange error, it complains about packages that are installed being missing, and states they cannot be installed.

e.g.

mamba install -c conda-forge nnpops

Looking for: ['nnpops']

conda-forge/linux-64                                        Using cache
conda-forge/noarch                                          Using cache

Pinned packages:
  - python 3.9.*

Could not solve for environment specs
Encountered problems while solving:
  - package torchaudio-2.2.1-py39_cu121 requires pytorch 2.2.1, but none of the providers can be installed

but

mamba list torch

#
# Name                    Version                   Build  Channel
pytorch                   2.2.1           py3.9_cuda12.1_cudnn8.9.2_0    pytorch
pytorch-cuda              12.1                 ha16c6d3_5    pytorch
pytorch-mutex             1.0                        cuda    pytorch
torch-ema                 0.3                pyhd8ed1ab_0    conda-forge
torchaudio                2.2.1                py39_cu121    pytorch
torchtriton               2.2.0                      py39    pytorch
torchvision               0.17.1               py39_cu121    pytorch

Does anyone have any idea what is going on? I have attached my env for reference.

CUDA info: Driver Version: 535.161.07 CUDA Version: 12.2

env.zip

Cheers, Ben

BenCree commented 3 months ago

As always, I have found what I was doing wrong minutes after making this issue, despite hours of attempts previously. I forgot to add -c pytorch. Hopefully this helps someone in the future.

RaulPPelaez commented 3 months ago

In general be careful about mixing conda-forge and other channels. Specially ones like NNPOps which are compiled. I am surprised you can install nnpops and pytorch 2.2.1 from the pytorch channel together, tbh. Good to know!

peastman commented 3 months ago

I'm also surprised that works. But I also don't understand what's going on. NNPOps doesn't directly depend on torchaudio. It does depend on pytorch, and presumably that's what indirectly pulls it in. But a pytorch package on conda-forge shouldn't be requiring a torchaudio version that isn't on conda-forge. So where is that error coming from?

RaulPPelaez commented 3 months ago

I think the OP followed this instructions to get pytorch, which pull torchaudio for some reason. image https://pytorch.org/get-started/locally/

BenCree commented 3 months ago

Thanks both, yeah I was trying to install MACE and had some issues with cuda/dependencies, so I tried starting from a fresh env with PyTorch in. I did think it was weird that torchaudio was required, but didn't have time to fully investigate. Cheers.