0

After a couple of tries, every time got the 'random_state_index is incorrect' error. I make the code as simple as much I can. But still getting the same error. I downgrade 'decorator' and 'networkx' versions, nothing changed.

networkx : 2.3.0 decorator : 4.3.0 matplotlib : 3.5.1

import networkx as nx
import matplotlib.pyplot as plt
%matplotlib notebook

K=nx.gnm_random_graph(10,15)
nx.draw(K)
trgtulas
  • 37
  • 6
  • it is working fine with my configuration 'matplotlib=3.3.2', 'networkx=2.5', 'decorator=4.4.2'. try updating the modules to most recent stable version instead of downgrading. this question might help https://stackoverflow.com/questions/66920533/networkx-shows-random-state-index-is-incorrect – micro5 Mar 28 '22 at 12:27

2 Answers2

0

I checked versions of the libraries in the 'cmd' and 'conda'. They weren't the same version. After grading the libraries same version, the problem is solved. Probably, this caused the error.

trgtulas
  • 37
  • 6
0

re-install matplotlib fixed it for me
pip install -U matplotlib

Baozbao
  • 1
  • 1