Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I import 'umap' package in python?

Tags:

python

import

After install 'umap' package, I can't import

I tried reinstall pre version (1.3.10, 1.4.0rc1). But, It's not working

How can I do?

!pip3 install umap-learn
!pip3 install umap-learn[plot]
import umap

This is the error I get:

No module named 'umap'

like image 707
MK Cho Avatar asked Mar 19 '26 11:03

MK Cho


1 Answers

you probably confused umap and umap-learn libs,

if that's the case, the code below'll solve your problem

https://umap-learn.readthedocs.io/en/latest/basic_usage.html

pip uninstall umap

pip install umap-learn

import umap.umap_ as umap
reducer = umap.UMAP()
like image 153
Thiago Rainmaker Avatar answered Mar 21 '26 01:03

Thiago Rainmaker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!