I have been using scanpy to analyze some single cell data using google colab.
Everything was working ok but all of a sudden I rerun the notebook and now when I try to import scanpy I get the error below. What could be causing this?
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-12-04a6a9427c98> in <module> 2 import numpy as np 3 import pandas as pd ----> 4 import scanpy as sc 5 import matplotlib.pyplot as plt 6 get_ipython().run_line_magic('matplotlib', 'inline') 3 frames /usr/local/lib/python3.8/dist-packages/scanpy/plotting/_utils.py in <module> 33 34 ---> 35 class _AxesSubplot(Axes, axes.SubplotBase, ABC): 36 """Intersection between Axes and SubplotBase: Has methods of both""" 37 TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
I am having same Metaclass issue in jupyter-notebook. I installed scanpy using pip and import scanpy as sc. then :
Hey there guys! I am having the exact same issue and I have been banging my head against the wall for the past 6 hours trying to fix it. I tried installing an older version of scanpy and looked at my old outputs when importing and matching the versions of all the prior import dependencies but with no avail.
Currently scouring through the init, anndata, and utils.py files, one thing I noticed was that a lot of the imports within them are trying to import classes that are not being recognized by pyright. This may be a possible link to it all and I am trying to see what paths are not being recognized and am trying to add them into the config.json file. Not sure if this will work but will update if else.
I saw this post but I did not realize how recent it was posted and realizing that this is the first post of the issue that I can find other than the one I made on scverse and considering that it was posted 9 hours ago I am guessing it is likely some bug in the new update for scanpy?
I never encountered this problem before and it started to me today yesterday as well. I am using google collab as well. Hopefully if more of us can reach out to the scanpy team it would streamline the time it takes for this to get resolved. So I encourage everyone who is also having this issue to contact them as well!
Furthermore, if it is an issue with a possible update I don't know why installing a prior version of scanpy would not fix the issue. But it didn't for me! Maybe try doing that too and see if it works on your guys end, and if it does please post the version that worked!
Here is my error, our errors seem to be referenced in different places within the plotting ._utils but its all seems to be from plotting ._util and we are all getting the same error regarding the metaclasses.
Great to know I'm not the only one struggling hope to hear from the team or anyone else about this issue soon!
101010button (NOT the double quote button) to format code. The former is for code, the latter is to quote something someone said elsewhere. I've fixed it for you (as best as I can - the double quote options wreks havoc on new lines) this time