resemble-ai / Resemblyzer

A python package to analyze and compare voices with deep learning
Apache License 2.0
2.67k stars 419 forks source link

In executing the demos: cannot import name 'UMAP' from 'umap' #6

Closed marcoippolito closed 4 years ago

marcoippolito commented 4 years ago

demo 01:

(Resemblizer) (base) marco@pc:~/Resemblyzer$ python3 demo01_similarity.py 
Traceback (most recent call last):
  File "demo01_similarity.py", line 2, in <module>
    from demo_utils import *
  File "/home/marco/Resemblyzer/demo_utils.py", line 6, in <module>
    from umap import UMAP
ImportError: cannot import name 'UMAP' from 'umap' (/home/marco/Resemblyzer/Resemblizer 
/lib/python3.7/site-packages/umap/__init__.py)

demo02 :

(Resemblizer) (base) marco@pc:~/Resemblyzer$ python3 demo02_diarization.py 
Traceback (most recent call last):
  File "demo02_diarization.py", line 2, in <module>
    from demo_utils import *
  File "/home/marco/Resemblyzer/demo_utils.py", line 6, in <module>
    from umap import UMAP
ImportError: cannot import name 'UMAP' from 'umap' (/home/marco/Resemblyzer/Resemblizer
/lib/python3.7/site-packages/umap/__init__.py)

demo03:

(Resemblizer) (base) marco@pc:~/Resemblyzer$ python3 demo03_projection.py 
Traceback (most recent call last):
  File "demo03_projection.py", line 2, in <module>
    from demo_utils import *
  File "/home/marco/Resemblyzer/demo_utils.py", line 6, in <module>
    from umap import UMAP
ImportError: cannot import name 'UMAP' from 'umap' (/home/marco/Resemblyzer/Resemblizer
/lib/python3.7/site-packages/umap/__init__.py)

How to solve the problem? Marco

CorentinJ commented 4 years ago

I've updated the requirements with the last push: https://github.com/resemble-ai/Resemblyzer/blob/master/requirements_demos.txt#L9

Just do pip install umap-learn

marcoippolito commented 4 years ago

Thanks!!!

Shridharpawar77 commented 3 years ago

Use import umap.umap_ as UMAP instead of from umap import UMAP