theislab / scarches

Reference mapping for single-cell genomics
https://docs.scarches.org/en/latest/
BSD 3-Clause "New" or "Revised" License
331 stars 51 forks source link

Fail to import scarches #202

Closed melancholy12 closed 1 year ago

melancholy12 commented 1 year ago

import scarches

ModuleNotFoundError Traceback (most recent call last) /tmp/ipykernel_119144/4038665422.py in ----> 1 import scarches

~/anaconda3/lib/python3.9/site-packages/scarches/init.py in ----> 1 from . import dataset, metrics, trainers, models, zenodo, plotting, utils, classifiers 2 3 author = ', '.join([ 4 'Mohammad Lotfollahi', 5 'Sergei Rybakov',

~/anaconda3/lib/python3.9/site-packages/scarches/models/init.py in ----> 1 from .trvae.trvae import trVAE 2 from .trvae.trvae_model import TRVAE 3 from .trvae.adaptors import Adaptor, attach_adaptors 4 from .scgen.vaearith import vaeArith 5 from .scgen.vaearith_model import scgen

~/anaconda3/lib/python3.9/site-packages/scarches/models/trvae/trvae.py in 7 8 from .modules import Encoder, Decoder ----> 9 from .losses import mse, mmd, zinb, nb 10 from ._utils import one_hot_encoder 11 from ..base._base import CVAELatentsModelMixin

~/anaconda3/lib/python3.9/site-packages/scarches/models/trvae/losses.py in ----> 1 from scvi.distributions import NegativeBinomial 2 import torch 3 from torch.autograd import Variable 4 from torch.distributions import Poisson 5 import torch.nn.functional as F

ModuleNotFoundError: No module named 'scvi.distributions'

I cannot install scarches in python 3.9 because the torch 1.6.0 cannot be installed. How can I solve this problem.? Thanks~

melancholy12 commented 1 year ago

scv 2.0.0 scvelo 0.2.4 scvi 0.6.8 scvi-colab 0.11.0 scvi-tools 0.7.1 scArches 0.5.9

Koncopd commented 1 year ago

Looks like your scvi-tools version is too old, please try with ~0.14. Feel free to reopen if still doesn't work.