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.

module 'scanpy' has no attribute 'get'

See original GitHub issue

Hello,

I am using scanpy version 1.4 from bioconda.

I am running one of the examples from the code to query datasets -

import scanpy as sc

pbmc = sc.datasets.pbmc3k()
print(pbmc)
plotdf = sc.get.obs_df(
    pbmc,
    keys=["CD8B", "n_genes"],
    obsm_keys=[("X_umap", 0), ("X_umap", 1)]
)
plotdf.plot.scatter("X_umap0", "X_umap1", c="CD8B")

the library can read the dataset but errors out saying scanpy has no attribute get.

I even tried

    from scanpy.get import obs_df
ModuleNotFoundError: No module named 'scanpy.get'

Did the API change for any of this ? Thanks!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
grstcommented, Sep 22, 2019

Actually I’ve always been using the conda package and never had any issues. Github releases are watched by the bioconda-bot, so it should never be out of date, either.

0reactions
jkanchecommented, Sep 21, 2019

some of the datasets like pbmc68k-reduced also seem to have an issue loading in conda.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tutorial example fails, AttributeError: module 'scanpy' has no ...
The functionality was there already in 1.3.6 but in a buggy way... Either use 1.3.7 or the previous way of importing the top-level...
Read more >
Python importing package as if it is a module - Stack Overflow
I just installed this on my backup test ubuntu computer and it works. enter image description here. I did: pip install scanpy in...
Read more >
AttributeError: module 'scanpy' has no attribute 'utils' - Help
when i ran the example file: PBMC10k_downstream-analysis sc.utils.sanitize_anndata(adata). AttributeError Traceback (most recent call last)
Read more >
Scanpy – Single-Cell Analysis in Python — Scanpy 1.9.1 ...
Scanpy – Single-Cell Analysis in Python . Scanpy is a scalable toolkit for analyzing single-cell gene expression data built jointly with anndata....
Read more >
scanpy · PyPI
Getting started | Features | Installation | References. Build Status. Scanpy – Single-Cell Analysis in Python. Scanpy is a scalable toolkit for analyzing ......
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