2010-07-30 42 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

相關問題