Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with installing openmmtorch and torch_scatter/torch_geometric #162

Open
AdeeshKolluru opened this issue Nov 14, 2024 · 1 comment
Open

Comments

@AdeeshKolluru
Copy link

AdeeshKolluru commented Nov 14, 2024

I want to install openmm-torch and pyg. I'm wondering if there are any known versions of these packages that work together.

Simple test

conda create -n test python=3.12
conda activate test
conda install openmm-torch -c conda-forge

this installs torch2.5.1.post303 with cuda version 11.8 on my system.

now when I try to install other packages through pip (conda isn't able to find a matching version)

pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.5.1+cu118.html

its unable to install these packages correctly

>>> import torch_scatter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "*/lib/python3.12/site-packages/torch_scatter/__init__.py", line 16, in <module>
    torch.ops.load_library(spec.origin)
  File "*/lib/python3.12/site-packages/torch/_ops.py", line 1350, in load_library
    ctypes.CDLL(path)
  File "*/lib/python3.12/ctypes/__init__.py", line 379, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: */lib/python3.12/site-packages/torch_scatter/_version_cuda.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSsb

It does seem like TorchMDNet uses all these packages but by default their environment.yml doesn't install openmm-torch. It would be great to know if there's any way around this.

Thanks!

@peastman
Copy link
Member

Mixing packages from pip and conda doesn't usually work. They use different versions of the C++ ABI, so they can't link to each other.

I'm trying to create a pip package for OpenMM-Torch, but I'm currently blocked by a PyTorch bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants