DeepChainBio / bio-transformers

bio-transformers is a wrapper on top of the ESM/Protbert model, trained on millions on proteins and used to predict embeddings.
https://bio-transformers.readthedocs.io/en/latest/getting_started/install.html
Apache License 2.0
143 stars 31 forks source link

Can not import properly after newest version installation #21

Closed idmjky closed 3 years ago

idmjky commented 3 years ago

Hi, I tried installing the new version of bio-transformers and when I import it, I get this error.

Traceback (most recent call last): File "main.py", line 1, in from biotransformers import BioTransformers File "/om2/user/kaiyi/anaconda/envs/bio-transformers/lib/python3.7/site-packages/biotransformers/init.py", line 1, in from biotransformers.bio_transformers import BioTransformers # noqa File "/om2/user/kaiyi/anaconda/envs/bio-transformers/lib/python3.7/site-packages/biotransformers/bio_transformers.py", line 5, in from biotransformers.wrappers.esm_wrappers import ESMWrapper File "/om2/user/kaiyi/anaconda/envs/bio-transformers/lib/python3.7/site-packages/biotransformers/wrappers/esm_wrappers.py", line 10, in from biotransformers.lightning_utils.data import AlphabetDataLoader File "/om2/user/kaiyi/anaconda/envs/bio-transformers/lib/python3.7/site-packages/biotransformers/lightning_utils/data.py", line 11, in from torch._six import int_classes as _int_classes ImportError: cannot import name 'int_classes' from 'torch._six' (/om2/user/kaiyi/anaconda/envs/bio-transformers/lib/python3.7/site-packages/torch/_six.py)

delfosseaurelien commented 3 years ago

I Just create a new conda environment and install : pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html and don't find this issue. Could you be more precise on your installation?

idmjky commented 3 years ago

I think when I tried installing pip install biotransofmers, it opts to install the torch==1.9.0. When I revert back to torch=1.8.0, everything works fine now.