QUVA-Lab / e2cnn

E(2)-Equivariant CNNs Library for Pytorch
https://quva-lab.github.io/e2cnn/
Other
599 stars 74 forks source link

Import Error with Torch 1.9.0+cu111 #48

Closed mb010 closed 2 years ago

mb010 commented 3 years ago

Error while import with Pytorch version 1.9.0+cu111 (maybe earlier)

----> 6 from e2cnn import nn as e2nn
      7 
      8 import utils

/venv/lib/python3.8/site-packages/e2cnn/nn/__init__.py in <module>
      3 from .geometric_tensor import GeometricTensor, tensor_directsum
      4 
----> 5 from .modules import *
      6 
      7 

/venv/lib/python3.8/site-packages/e2cnn/nn/modules/__init__.py in <module>
     48 
     49 from .sequential_module import SequentialModule
---> 50 from .module_list import ModuleList
     51 from .identity_module import IdentityModule
     52 

/venv/lib/python3.8/site-packages/e2cnn/nn/modules/module_list.py in <module>
      2 from .equivariant_module import EquivariantModule
      3 
----> 4 from torch._six import container_abcs
      5 
      6 import torch

ImportError: cannot import name 'container_abcs' from 'torch._six' (/home/s51972mb/Documents/EquivariantSelfAttention/venv/lib/python3.8/site-packages/torch/_six.py)

Potential fix: https://github.com/NVIDIA/apex/pull/1049#issue-570454175

ejnnr commented 3 years ago

This should be fixed by #44 (which is not yet on PyPI I think). In the meantime, you can install the latest version directly from Github with

pip install git+https://github.com/QUVA-Lab/e2cnn
Gabri95 commented 2 years ago

hey!

Sorry for the delay: PyPI is now also updated with the latest version of the library so this should not be a problem anymore.

Thanks for reporting it

Best, Gabriele