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.

"PackageNotFoundError: umap-learn" with importlib_metadata version 0.6. Update requirements to importlib_metadata>=0.7

See original GitHub issue

Hey! I just updated to latest master branch and I can no longer load scanpy.

import scanpy as sc gives me the error:

PackageNotFoundError                      Traceback (most recent call last)
<ipython-input-1-0074c9bc0b31> in <module>
----> 1 import scanpy as sc

~/new_scanpy/scanpy/scanpy/__init__.py in <module>
     25 __version__ = get_versions()['version']
     26 
---> 27 check_versions()
     28 del get_versions, check_versions
     29 

~/new_scanpy/scanpy/scanpy/utils.py in check_versions()
     38 
     39     anndata_version = version("anndata")
---> 40     umap_version = version("umap-learn")
     41 
     42     if anndata_version < LooseVersion('0.6.10'):

~/anaconda3/envs/sc-tutorial/lib/python3.6/site-packages/importlib_metadata/api.py in version(package)
    103         "Version" metadata key.
    104     """
--> 105     return distribution(package).version
    106 
    107 

~/anaconda3/envs/sc-tutorial/lib/python3.6/site-packages/importlib_metadata/api.py in distribution(package)
     84     :return: A ``Distribution`` instance (or subclass thereof).
     85     """
---> 86     return Distribution.from_name(package)
     87 
     88 

~/anaconda3/envs/sc-tutorial/lib/python3.6/site-packages/importlib_metadata/api.py in from_name(cls, name)
     50                 return resolved
     51         else:
---> 52             raise PackageNotFoundError(name)
     53 
     54     @staticmethod

PackageNotFoundError: umap-learn                                                                                                                                                                                                                                                                 

I have umap-learn 0.3.9 installed.

Scanpy version: 1.4.3+115.g1aecabf Anndata version: 0.6.22rc1

It seems to work with umap-learn 0.3.8, scanpy 1.4.3+105.gc748b35. and anndata 0.6.22.post1+1.g8dcc3cd

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
flying-sheepcommented, Jul 19, 2019

True. Setting the requirement to 0.18 wouldn’t have hurt either though!

1reaction
LuckyMDcommented, Jul 19, 2019

ah, but then we would not have found the version where this is an issue 😉. But yes… will update all relevant packages next time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

umap-learn" with importlib_metadata version 0.6. Update ...
Hey! I just updated to latest master branch and I can no longer load scanpy. import scanpy as sc gives me the error:...
Read more >
Using importlib.metadata — Python 3.11.1 documentation
New in version 3.8. Changed in version 3.10: importlib.metadata is no longer provisional. ... importlib_metadata is a library that provides access to the...
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