I ran pip install umap and import umap, but umap.UMAP() fails.
Why this happens
There's an unrelated package on PyPI called umap. The UMAP dimensionality reduction library is published as umap-learn. If you installed umap, the import works but loads the wrong package. The same error can also happen if you have a file named umap.py in your working directory, because Python imports your file instead of the library.
Answer 1: Install the correct package
pip uninstall umap
pip install umap-learn
You still import it as umap:
import umap
reducer = umap.UMAP()
