lmcinnes / umap

Uniform Manifold Approximation and Projection
BSD 3-Clause "New" or "Revised" License
7.34k stars 798 forks source link

module 'umap' has no attribute 'UMAP' #828

Open renzha-miun opened 2 years ago

renzha-miun commented 2 years ago

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 commented 2 years ago

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

ranabanik commented 2 years ago

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

agombert commented 1 year ago

from this answer

pip uninstall umap
pip install umap-learn
import umap.umap_ as umap
ImChet commented 1 year ago

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'

vaaale commented 1 year ago

This worked for me:

from umap.umap_ import UMAP

chandrasekarnarayana commented 10 months ago

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

jayant-yadav commented 10 months ago

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

imaspol commented 5 months ago

Nothing of proposed works for me

Terrence-zzh commented 3 months ago

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.

mattolson93 commented 3 months ago

If you are a fool like me and named your experiment umap.py that will cause this issue as well.