使用py2.7.8运行
import networkx as nx
import matplotlib.pyplot as plt
G =nx.random_graphs.barabasi_albert_graph(100,1)
nx.draw(G)报错AttributeError: 'module' object has no attribute 'full'
查看了一下使用的numpy版本为1.8,用dir()函数查看发现没有full函数,查看其他电脑下numpy1.14.3有full函数且可以正常运行nx.draw(G)语句
想着能不能把现有的numpy版本降低,使用pip install -U numpy==1.14.3,但是一直报错cannot uninstall 'numpy'. it is a dictutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall
求问如何解决一开始的问题,降低版本的思路是对的吗?
PS:有尝试着把对用的full函数黏贴到1.8版本中,但是还是报错TypeError: concat() got an unexpected keyword argument 'axis',或者是我黏贴的方式不对??