question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi there, these are my system specs: macOS Sierra 10.12.3 (16D32)

I have installed umap through pip. When I try to run it this the error message that comes up. I’m unsure what the problem is, any ideas?

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-10-68ef34dfa695> in <module>()
     16         umap_mfccs = get_scaled_umap_embeddings(mfcc_features,
     17                                                 neighbours,
---> 18                                                 distances)
     19         umap_embeddings_mfccs.append(umap_mfccs)
     20 

<ipython-input-10-68ef34dfa695> in get_scaled_umap_embeddings(features, neighbour, distance)
      1 def get_scaled_umap_embeddings(features, neighbour, distance):
      2 
----> 3     embedding = umap.UMAP(n_neighbors=neighbour,
      4                           min_dist = distance,
      5                           metric = 'correlation').fit_transform(features)

AttributeError: module 'umap' has no attribute 'UMAP'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:23 (4 by maintainers)

github_iconTop GitHub Comments

90reactions
matiasdahlcommented, Sep 22, 2018

I also had the same issue (import umap; umap.UMAP returns AttributeError: module 'umap' has no attribute 'UMAP') (MacOS, High Sierra, installed via pip).

As a workaround import umap.umap_ as umap seems to work instead of import umap

53reactions
lmcinnescommented, Nov 22, 2017

Hi, I can’t say for sure but potentially it may be that you actually have the wrong umap. Due to name collisions the UMAP algorithm code is under the name umap-learn on PyPI so if you did

pip install umap

you will get a different package that does not to what you want.

If that is the case then you’ll want

pip uninstall umap
pip install umap-learn

If that is not the problem then there is something else wrong that is going to be harder to diagnose. Either way, please let me know, and sorry about the naming confusion on pip.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix AttributeError in Python - Rollbar
The Python AttributeError is an exception that occurs when an attribute reference or assignment fails. This can occur when an attempt is ...
Read more >
Python AttributeError: A How-To Guide - Career Karma
A Python AttributeError is raised when you try to call an attribute of an object whose type does not support that method. For...
Read more >
Error Encyclopedia | Attribute Error
Attribute errors in Python are generally raised when you try to access or call an attribute that a particular object type doesn't possess....
Read more >
Attribute Error Python - STechies
Attribute error occurs in python when we try to assign an attribute value to a python objects or class instance in which that...
Read more >
The Python AttributeError - Linux Hint
The errors prevent the program from running. One of the most common faults in Python is “Attribute Error”. The AttributeError is defined as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found