# Problem after igraph installation

**URL:** <https://discourse.scverse.org/t/problem-after-igraph-installation/952>\
**Category:** scanpy\
**Created:** [November 23, 2022, 11:21am UTC](https://discourse.scverse.org/t/problem-after-igraph-installation/952 "2022-11-23T11:21:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LianyongHan](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@LianyongHan](https://discourse.scverse.org/u/LianyongHan)\
**Post date:** [November 23, 2022, 11:21am UTC](https://discourse.scverse.org/t/problem-after-igraph-installation/952/1 "2022-11-23T11:21:21Z")

</div>

I was running PAGA velocity graph in agando work station. During the step, I installed igraph to run it.

However, later when I run other code, there are errors happen:

AttributeError: module ‘igraph’ has no attribute ‘VertexClustering’ that I cannot continue running.

Any solutions on this?

## (In details it looks like this)

AttributeError Traceback (most recent call last)  
/tmp/ipykernel\_72296/2165774206.py in   
----\> 1 import ma\_codes as codes  
2 from ma\_codes import mysize, gray\_red, timestamp  
3  
4 import numpy as np  
5 import matplotlib.pyplot as plt

~/Documents/Meshal/PhD\_Scripts/scRNA\_Analysis\_CodeRepo/ma\_codes.py in   
----\> 1 import scanpy as sc  
2 import numpy as np  
3 import pandas as pd  
4 import matplotlib.pyplot as plt  
5 import seaborn as sb

~/anaconda3/lib/python3.7/site-packages/scanpy/ **init**.py in   
12 # (start with settings as several tools are using it)  
13 from .\_settings import settings, Verbosity  
—\> 14 from . import tools as tl  
15 from . import preprocessing as pp  
16 from . import plotting as pl

~/anaconda3/lib/python3.7/site-packages/scanpy/tools/ **init**.py in   
13 from .\_rank\_genes\_groups import rank\_genes\_groups, filter\_rank\_genes\_groups  
14 from .\_dpt import dpt  
—\> 15 from .\_leiden import leiden  
16 from .\_louvain import louvain  
17 from .\_sim import sim

~/anaconda3/lib/python3.7/site-packages/scanpy/tools/\_leiden.py in   
13  
14 try:  
—\> 15 from leidenalg.VertexPartition import MutableVertexPartition  
16 except ImportError:  
17

~/anaconda3/lib/python3.7/site-packages/leidenalg/ **init**.py in   
33 not immediately available in :func:`leidenalg.find_partition`.  
34 “”"  
—\> 35 from .functions import ALL\_COMMS  
36 from .functions import ALL\_NEIGH\_COMMS  
37 from .functions import RAND\_COMM

~/anaconda3/lib/python3.7/site-packages/leidenalg/functions.py in   
21 return graph.\_\_graph\_as\_cobject()  
22  
—\> 23 from .VertexPartition import \*  
24 from .Optimiser import \*  
25

~/anaconda3/lib/python3.7/site-packages/leidenalg/VertexPartition.py in   
6 PY3 = (sys.version \> ‘3’)  
7  
----\> 8 class MutableVertexPartition(\_ig.VertexClustering):  
9 “”" Contains a partition of graph, derives from :class:`ig.VertexClustering`.  
10

AttributeError: module ‘igraph’ has no attribute ‘VertexClustering’

---

<div class="post-metadata">

**Author:** ![LianyongHan](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@LianyongHan](https://discourse.scverse.org/u/LianyongHan)\
**Post date:** [November 23, 2022, 3:23pm UTC](https://discourse.scverse.org/t/problem-after-igraph-installation/952/2 "2022-11-23T15:23:37Z")

</div>

The problem now solved!
