Problem after igraph installation

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’

The problem now solved!