2010-07-30 40 views
0

当我使用我的系统时,我的Python代码中没有错误。当我使用另一个系统时,我得到这个错误:(两个系统都有相同版本的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

matplotlib版本也是一样吗? – kirbuchi 2010-07-30 11:17:17

+0

不,它似乎不是! – masti 2010-07-30 11:22:56

+0

@masti:错误来自'networkx'包,因此需要先检查它。 – SilentGhost 2010-07-30 11:24:31

回答

4

有一个提示。

matplotlib.numerix and all its subpackages are deprecated. 
They will be removed soon. Please use numpy instead. 

获取此错误的系统安装了旧软件包。

尽管“版本的python”可能相同,但安装的软件包集不同。

+0

我如何使用numpy作为暗示暗示? – masti 2010-07-30 11:25:02

+0

不使用'matplotlib.numerix'中的函数,而是使用'numpy'中的函数。你必须查阅文档。 – katrielalex 2010-07-30 11:27:06

相关问题