I know it is a duplicate, but this hasn't solved my issue nor other guide online has.
I have installed the Anaconda distribution and it is the only Python environment I have on this computer. I always used Jupyter as Python "engine" and things worked flawlessly up until now, where I have switched to Sublime editor + CMD. I have tried to reinstall it via pip install -U networkx
and via downloading from Git and then pip install .
but none of them worked.
import networkx as nx
gr= nx.Graph()
Traceback (most recent call last):
File "networkx.py", line 1, in <module>
import networkx as nx
File "C:\Users\Utente\nx\networkx.py", line 3, in <module>
gr = nx.Graph()
AttributeError: module 'networkx' has no attribute 'Graph'
For whatever reason, using Jupyter QtConsole works, but I cannot use that to write and debug code