2017-09-29 74 views
1

我嘗試導入matplotlib.pyplot進口matplotlib.pyplot,這裏是我的代碼:錯誤而與Geany IDE

import matplotlib.pyplot as plt 

squares = [1, 4, 9, 16, 25] 
plt.plot(squares) 
plt.show() 

我使用Geany IDE Ubuntu下03年4月16日,我收到在 以下errormessage的

[1, 2, 3, 4, 5] 
Traceback (most recent call last): 
File "mpl_squares.py", line 1, in <module> 
import matplotlib.pyplot as plt 
File "/usr/local/lib/python3.5/dist-packages/matplotlib/__init__.py", line 122, in <module> 
from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label 
File "/usr/local/lib/python3.5/dist-packages/matplotlib/cbook.py", line 32, in <module> 
import numpy as np 
File "/usr/local/lib/python3.5/dist-packages/numpy/__init__.py", line 142, in <module> 
from . import add_newdocs 
File "/usr/local/lib/python3.5/dist-packages/numpy/add_newdocs.py", line 13, in <module> 
from numpy.lib import add_newdoc 
File "/usr/local/lib/python3.5/dist-packages/numpy/lib/__init__.py", line 8, in <module> 
from .type_check import * 
File "/usr/local/lib/python3.5/dist-packages/numpy/lib/type_check.py", line 11, in <module> 
import numpy.core.numeric as _nx 
File "/usr/local/lib/python3.5/dist-packages/numpy/core/__init__.py", line 35, in <module> 
from . import _internal # for freeze programs 
File "/usr/local/lib/python3.5/dist-packages/numpy/core/_internal.py", line 18, in <module> 
from .numerictypes import object_ 
File "/usr/local/lib/python3.5/dist-packages/numpy/core/numerictypes.py", line 962, in <module> 
_register_types() 
File "/usr/local/lib/python3.5/dist-packages/numpy/core/numerictypes.py", line 958, in _register_types 
numbers.Integral.register(integer) 
AttributeError: module 'numbers' has no attribute 'Integral' 

當我使用Geany IDE中,當我運行在正常工作的終端 代碼只出現此錯誤。

有人知道Geany有什麼問題嗎?

提前致謝!

回答