AttributeError: module 'umap' has no attribute 'UMAP'
I tried installing & reinstalling different libraries of umap and umap learn but didn't work any..
To use UMAP
you need to install umap-learn
not umap
.
So, in case you installed umap
run the following commands to uninstall umap and install upam-learn instead:
pip uninstall umap
pip install umap-learn
And then in your python code make sure you are importing the module using:
import umap.umap_ as umap
Instead of
import umap
If you still facing the issue try this.
import umap.umap_ as umap
I have got the same issue and found two solutions:
1 - Solving on your machine by updating the library via git
git clone https://github.com/lmcinnes/umap
cd umap
pip install --user -r requirements.txt
python setup.py install --user
Source
2 - Solving on Colab by forcing the installation of a version of umap
!pip install 'umap-learn==0.3.10'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With