为了账号安全,请及时绑定邮箱和手机立即绑定

如何修复 ModuleNotFoundError: No module named

如何修复 ModuleNotFoundError: No module named

慕姐8265434 2021-09-28 15:40:47
这是一个简短的python脚本:import matplotlib.pyplot as pltimport networkx as nxfrom networkx.drawing.nx_agraph import graphviz_layoutG = nx.DiGraph()当它由普通 python 执行时,它给出了以下堆栈跟踪:Traceback (most recent call last):  File "python/spikes/networkx.py", line 17, in <module>    import networkx as nx  File "/home/peng/git/mxnet-spike/python/spikes/networkx.py", line 18, in <module>    from networkx.drawing.nx_agraph import graphviz_layoutModuleNotFoundError: No module named 'networkx.drawing'; 'networkx' is not a package什么可能导致这种情况?python解释器有缺陷吗?
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 775 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信