Error occurs when I draw UMAP using sc.pl.umap().
Version:
Python 3.9.7
scanpy 1.9.4
Run in Jupyter
import scanpy as sc
adata = sc.datasets.pbmc68k_reduced()
sc.pl.umap(adata)
Output
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[3], line 2
1 adata = sc.datasets.pbmc68k_reduced()
----> 2 sc.pl.umap(adata)
File ~/.julia/conda/3/lib/python3.9/site-packages/scanpy/plotting/_tools/scatterplots.py:668, in umap(adata, **kwargs)
609 @_wraps_plot_scatter
610 @_doc_params(
611 adata_color_etc=doc_adata_color_etc,
(...)
615 )
616 def umap(adata, **kwargs) -> Union[Axes, List[Axes], None]:
617 """\
618 Scatter plot in UMAP basis.
619
(...)
666 tl.umap
667 """
--> 668 return embedding(adata, 'umap', **kwargs)
File ~/.julia/conda/3/lib/python3.9/site-packages/scanpy/plotting/_tools/scatterplots.py:162, in embedding(adata, basis, color, gene_symbols, use_raw, sort_order, edges, edges_width, edges_color, neighbors_key, arrows, arrows_kwds, groups, components, dimensions, layer, projection, scale_factor, color_map, cmap, palette, na_color, na_in_legend, size, frameon, legend_fontsize, legend_fontweight, legend_loc, legend_fontoutline, colorbar_loc, vmax, vmin, vcenter, norm, add_outline, outline_width, outline_color, ncols, hspace, wspace, title, show, save, ax, return_fig, **kwargs)
160 else:
161 cmap = color_map
--> 162 cmap = copy(colormaps.get_cmap(cmap))
163 cmap.set_bad(na_color)
164 kwargs["cmap"] = cmap
AttributeError: 'ColormapRegistry' object has no attribute 'get_cmap'