Skip to content

ImportError: cannot import name '_compute_connectivities_umap' from 'scanpy.neighbors'  #135

Closed
@nbutyrate

Description

@nbutyrate

Python 3.9.18 | packaged by conda-forge | (main, Dec 23 2023, 16:36:46)
[Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.

I installed muon and tried to run one of the tutorial and got the following error, please help

import numpy as np
import pandas as pd
import scanpy as sc
import anndata as ad

import muon as mu
Traceback (most recent call last):
File "", line 1, in
File "/Users/naseersangwan/Desktop/Conda/envs/R_2024/lib/python3.9/site-packages/muon/init.py", line 6, in
from ._core import preproc as pp
File "/Users/naseersangwan/Desktop/Conda/envs/R_2024/lib/python3.9/site-packages/muon/_core/preproc.py", line 15, in
from scanpy.neighbors import _compute_connectivities_umap
ImportError: cannot import name '_compute_connectivities_umap' from 'scanpy.neighbors' (

Activity

bio-la

bio-la commented on Mar 27, 2024

@bio-la

hi, got the same error since updating scanpy in the last 12 hours
scanpy 1.10.0, muon 0.1.5, anndata 0.8.0

dorzhey

dorzhey commented on Mar 29, 2024

@dorzhey

hello, yes same dependencies, same problem

WLYYYYY

WLYYYYY commented on Mar 29, 2024

@WLYYYYY

Same here, it seems like the last version of Scanpy compatible with muon is v1.9.8.

seyoon-lee

seyoon-lee commented on Apr 9, 2024

@seyoon-lee

seems like I'm two weeks late, but still with the same issue.

zijunmeng

zijunmeng commented on Apr 30, 2024

@zijunmeng

same errors with scanpy 1.10.1, muon 0.1.5, anndata 0.10.6 ,

grst

grst commented on Apr 30, 2024

@grst
Contributor

Oh, I think we still need a patch release @gtca?

gtca

gtca commented on May 1, 2024

@gtca
Collaborator

@grst, the 0.1.5 is the version for which this issue has been open for, the 0.1.6 has already been released to fix that for the new version of scanpy.

@zijunmeng, can you check that it fixed the issue for you?

grst

grst commented on May 1, 2024

@grst
Contributor

Sorry, got confused by that release missing on github. But I've seen it's there now :)

zijunmeng

zijunmeng commented on May 2, 2024

@zijunmeng

@grst, the 0.1.5 is the version for which this issue has been open for, the 0.1.6 has already been released to fix that for the new version of scanpy.

@zijunmeng, can you check that it fixed the issue for you?

yes, thank you, i have solved this problem. In my env, I have installed scvi, scglue, and muon. Two days ago, I encountered conflicts between muon's functions and scvi. I have now uninstalled the original 0.1.5 version and reinstalled the 0.1.6 version using pip. The conflicts have indeed disappeared. Thank you again for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @grst@bio-la@nbutyrate@gtca@zijunmeng

      Issue actions

        ImportError: cannot import name '_compute_connectivities_umap' from 'scanpy.neighbors' · Issue #135 · scverse/muon