Skip to content

ModuleNotFoundError: No module named 'louvain' #1369

@sheetalgiri

Description

@sheetalgiri

Getting the following error with the latest version of scanpy:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-24-7f6e74b434f4> in <module>
----> 1 sc.tl.louvain(adata, resolution=0.2, key_added='louvain_r0.2', random_state=10)
      2 sc.tl.louvain(adata, resolution=0.1, key_added='louvain_r0.1', random_state=10)

~/xconda/newconda/envs/cpumode/lib/python3.6/site-packages/scanpy/tools/_louvain.py in louvain(adata, resolution, random_state, restrict_to, key_added, adjacency, flavor, directed, use_weights, partition_type, partition_kwargs, neighbors_key, obsp, copy)
    135             weights = None
    136         if flavor == 'vtraag':
--> 137             import louvain
    138             if partition_type is None:
    139                 partition_type = louvain.RBConfigurationVertexPartition

ModuleNotFoundError: No module named 'louvain'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions