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.
- Downloaded networkx-1.11.zip
- Extracted the zip file
- open the cmd and
cd to extracted directory
- run
python setup.py install
- verified the installation using
pip freeze
- saved the test code in
netExample.py
file. - In CMD, cd to the folder, which contains
netExample.py
- run
python netExample.py
Following is output that I got:
D:\Naveen\so>python netExample.py
[]
[]
<class'list'>
<class'list'>
Please check the following:
- Verify whether you are downloading from the official website.
- Check if any other file named
networkx.py
is present in Windows Path before the actualnetworkx
module is present in
Post a Comment for "Attributeerror: Module 'networkx' Has No Attribute 'graph'"