当我使用我的系统时,我的python代码中没有错误。当我使用另一个系统时,我收到此错误:(两个系统都有相同版本的python)
/usr/lib/pymodules/python2.6/matplotlib/numerix/__init__.py:18: DeprecationWarning:
**********************************************************
matplotlib.numerix and all its subpackages are deprecated.
They will be removed soon. Please use numpy instead.
**********************************************************
warnings.warn(msg, DeprecationWarning)
/usr/lib/pymodules/python2.6/networkx/generators/hybrid.py:16: DeprecationWarning: the sets module is deprecated
import sets
Traceback (most recent call last):
File "./check_2.py", line 79, in <module>
G.add_edge(u,v,times=[t])
TypeError: add_edge() got an unexpected keyword argument 'times'
答案 0 :(得分:4)
有一个提示。
matplotlib.numerix and all its subpackages are deprecated.
They will be removed soon. Please use numpy instead.
获得此错误的系统安装了旧软件包。
虽然“python的版本”可能相同,但已安装的软件包集不同。