Skip to content Skip to sidebar Skip to footer

Attributeerror: Module 'networkx' Has No Attribute 'graph'

I installed networkx by downloading the distribution file and running: python setup.py install It appears to have been successful, I got this message after installing Installed c:

Solution 1:

Following the below steps, it worked for me in python 3.5 version.

  1. Downloaded networkx-1.11.zip
  2. Extracted the zip file
  3. open the cmd and cd to extracted directory
  4. run python setup.py install
  5. verified the installation using pip freeze
  6. saved the test code in netExample.py file.
  7. In CMD, cd to the folder, which contains netExample.py
  8. run python netExample.py

Following is output that I got:

D:\Naveen\so>python netExample.py
[]
[]
<class'list'>
<class'list'>

Please check the following:

  1. Verify whether you are downloading from the official website.
  2. Check if any other file named networkx.py is present in Windows Path before the actual networkx module is present in

Post a Comment for "Attributeerror: Module 'networkx' Has No Attribute 'graph'"