-
Notifications
You must be signed in to change notification settings - Fork 350
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
Importerror for scVI in tutorials #1464
Comments
If I had to guess it's because the latest pyro version lower bounds torch to 1.11.0 and somehow the colab environment has an older version of torchtext, which I believe may be required by pytorch lightning |
I think our options are to either wait for this googlecolab/colabtools#2668 or to upper bound pyro. I'm inclined to wait. |
Hi @adamgayoso so are you saying that I cant use the SCVI at this stage? |
@adamgayoso I don't think that Google is known for solving their issues fast. IMO working tutorials (with collab) are very important and I would suggest to upper bound pyro instead of waiting. Choice is yours ofc. |
Presently this works: !pip install scvi-tools==0.15.1 pyro-ppl==1.8.0 umap-learn scanpy scikit-misc leidenalg --quiet |
Indeed the problem is solved if the very first thing that is done is @Zethson I think the solution is a |
Done.
This will install scvi-tools for you in google colab. We will update all the tutorials in a patch release to reflect this. |
hi @adamgayoso I am still getting the same error even through I have follow your suggestion. %%capture #if branch is stable, will install via pypi, else will install from source if IN_COLAB and branch == "stable": ImportError Traceback (most recent call last) 12 frames ImportError: /usr/local/lib/python3.7/dist-packages/torchtext/_torchtext.so: undefined symbol: _ZNK3c104Type14isSubtypeOfExtERKSt10shared_ptrIS0_EPSo |
@DRSEI please check the tutorials again in a few minutes |
Thank you @adamgayoso |
I am running into the exact same problem as DRSEI describes above: %%capture #if branch is stable, will install via pypi, else will install from source if IN_COLAB and branch == "stable": !pip install --quiet scvi-colab gives me the following error: ImportError: /usr/local/lib/python3.7/dist-packages/torchtext/_torchtext.so: undefined symbol: _ZNK3c104Type14isSubtypeOfExtERKSt10shared_ptrIS0_EPSo Any ideas? |
@rangan2510 I believe I am using the proposed workaround: !pip install --quiet scvi-colab But I still get the import error? |
For me, this worked on Kaggle. You may try it out. |
Thanks, I successfully ran the above ^: However the following: import scvi sc.set_figure_params(figsize=(4, 4)) for white background of figures (only for docs rendering)%config InlineBackend.print_figure_kwargs={'facecolor' : "w"} As well as: !pip install --quiet scvi-colab Both give me the import error. I am thinking it might have something to do with a PyTorch dependency? I am running PyTorch: '1.11.0+cu102' |
@bigtimecodersean I believe it's something else. I am sharing a link to a notebook I have on Colab and it works fine. Did a !pip freeze so you can check the versions: scVI import.ipynb |
@rangan2510 Thanks for the help. I just ran your code line by line and got the exact same import error on the: "import scvi" line in your second block. Bizarre |
Starting a new notebook solved the problem with your solution @rangan2510 Thank you so much!!! |
should instead only be
I don't believe this new code will work in kaggle unless you run it like
|
Hi. I am hoping to ask a question related to the above point please. I had scVI working fine in Colab a few months ago but when I have come back to it today, when I run
I get the following message:
If I do !pip freeze after this it looks like scvi has indeed installed. But then when I run Does anyone know why this is happening please? Thanks in advance. |
Describe the bug
To reproduce
Execute your very own tutorial: https://colab.research.google.com/github/scverse/scvi-tutorials/blob/0.15.3/api_overview.ipynb
Versions:
Latest stable
I suspect that this is some missmatch of incompatible versions of PyTorch and torchtext.
The text was updated successfully, but these errors were encountered: