问题描述
我是编码的初学者。你能帮我如何使用networkX在Python Anaconda上读取/打印gml文件吗?我安装了库,代码如下所示:
import networkx as nx
g = nx.read_gml("gebaude.gml")
print(nx.info(g))
在我运行之后,控制台看起来像这样:
runfile('C:/Users/aksupi/Desktop/Experiment1.py',wdir='C:/Users/aksupi/Desktop')
Traceback (most recent call last):
File "C:\Users\aksupi\Desktop\Experiment1.py",line 10,in <module>
g = nx.read_gml("gebaude.gml")
File "<decorator-gen-812>",line 2,in read_gml
File "C:\Users\aksupi\anaconda3\lib\site-packages\networkx\utils\decorators.py",line 213,in _open_file
fobj = _dispatch_dict[ext](path,mode=mode)
FileNotFoundError: [Errno 2] No such file or directory: 'gebaude.gml'
[enter image description here][2]
有什么问题?我需要将 gml 文件放在我电脑的什么位置?
我很期待很快收到您的来信。
最好的问候,
皮纳尔