Umap: ImportError: umap.plot requires matplotlib, datashader, colorcet and holoviews to be installed

Created on 16 Apr 2020  路  7Comments  路  Source: lmcinnes/umap

Install umap using below commands:

pip install umap-learn
pip install "umap-learn[plot]"

and they run successfully.

but when I import umap.plot, it occurs:

image

But actually, these packages matplotlib, datashader, colorcet and holoviews have been installed.

so what I should do to fix this error?

Big thanks!

Most helpful comment

Hi!

A suggestion, not solution.
I got this error in my jupyter notebook as well. The problem was with importing holoviews. But since, thats not your issue:
This is the code that from which the error is being raised. You could try executing this code and see if you could find any error. It may not solve your problem, but give it a shot.

import pandas as pd
import datashader as ds
import datashader.transfer_functions as tf
import datashader.bundling as bd
import matplotlib.pyplot as plt
import colorcet
import matplotlib.colors
import matplotlib.cm
import bokeh.plotting as bpl
import bokeh.transform as btr
import holoviews as hv
import holoviews.operation.datashader as hd

All 7 comments

I had the same issue and had to install the imgcat package as well.

Recently, ran into this above didn't help.

According to this: https://github.com/numba/numba/issues/5051#issuecomment-574300560 it is necessary to have numba 0.46 with llvmlite 0.30

Try to check it.

In my case:

apt install llvm-8-dev
export CXXFLAGS=-fPIC
poetry add numba=0.46 llvmlite=0.30 umap-learn[plot]

was necessary.

Sadly same problem here

Edit: non of the above solutions worked.

Hi!

A suggestion, not solution.
I got this error in my jupyter notebook as well. The problem was with importing holoviews. But since, thats not your issue:
This is the code that from which the error is being raised. You could try executing this code and see if you could find any error. It may not solve your problem, but give it a shot.

import pandas as pd
import datashader as ds
import datashader.transfer_functions as tf
import datashader.bundling as bd
import matplotlib.pyplot as plt
import colorcet
import matplotlib.colors
import matplotlib.cm
import bokeh.plotting as bpl
import bokeh.transform as btr
import holoviews as hv
import holoviews.operation.datashader as hd

This was a great suggestion for me - I found my datashader needed numba != 0.50.1 to use CUDA, which umap.plot wants, so a quick numba update solved the error.

@pramitchoudhary Also, a great suggestion for me! Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gabritaglia picture gabritaglia  路  5Comments

MichaelMonashev picture MichaelMonashev  路  3Comments

Vslira picture Vslira  路  4Comments

ajkl picture ajkl  路  4Comments

ravimulpuri picture ravimulpuri  路  7Comments