umap icon indicating copy to clipboard operation
umap copied to clipboard

module 'umap' has no attribute 'UMAP'

Open renzha-miun opened this issue 2 years ago • 10 comments

I tried to run the example code published at https://www.kaggle.com/jack89roberts/the-journey-of-an-image-through-a-neural-network/notebook, but I got a error: "module 'umap' has no attribute 'UMAP'"

Here is the information.

Input...Traceback (most recent call last): File "/Users/renzha/Library/Application Support/JetBrains/PyCharmCE2021.2/scratches/visualization of cnn.py", line 484, in nvis.umap_layers(range(251)) File "/Users/renzha/Library/Application Support/JetBrains/PyCharmCE2021.2/scratches/visualization of cnn.py", line 244, in umap_layers pipe_out = umap.UMAP ().fit_transform (pipe_in) AttributeError: module 'umap' has no attribute 'UMAP'

How to solve the problem? Thank you.

renzha-miun avatar Jan 12 '22 20:01 renzha-miun

just found out that umap-learn need to be installed.

renzha-miun avatar Jan 12 '22 20:01 renzha-miun

I had umap 0.1.1 installed. But had the same error. Then installed umap-learn 0.5.2. Still got the error and then uninstalled umap. It worked.

from umap import UMAP

ranabanik avatar Mar 07 '22 21:03 ranabanik

from this answer

pip uninstall umap
pip install umap-learn
import umap.umap_ as umap

agombert avatar Oct 07 '22 11:10 agombert

I am not able to get this working with anything that I try. I have umap-learn installed, not umap. I have tried importing as above, no luck. Any ideas?

my error is this:

AttributeError: module 'umap' has no attribute 'UMAP'

ImChet avatar Dec 06 '22 17:12 ImChet

This worked for me:

from umap.umap_ import UMAP

vaaale avatar Dec 10 '22 11:12 vaaale

pip install umap-learn is still giving error pip install umap-learn==0.5.2 worked for me.

chandrasekarnarayana avatar Oct 30 '23 17:10 chandrasekarnarayana

@lmcinnes please apply a patch so that beginners like me can at least start using this awesome library.

jayant-yadav avatar Nov 09 '23 18:11 jayant-yadav

Nothing of proposed works for me

imaspol avatar Apr 10 '24 15:04 imaspol

pip install umap-learn is still giving error pip install umap-learn==0.5.2 worked for me.

my python version is 3.7, and only the method works for me. Thanks for you.

Terrence-zzh avatar May 13 '24 07:05 Terrence-zzh