新手学pyhthon。。。然后遇到一个错误。。。麻烦各位大神看一眼这咋解决啊
squares = [value**2 for value in range(1,11)]
print(squares)
C:\Users\Ranger\AppData\Local\Programs\Python\Python36-32\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3.4\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 52506 --file C:/Users/Ranger/Desktop/python_works/squares.py
Traceback (most recent call last):
[2, 4, 6, 8, 10]
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3.4\helpers\pydev\pydevd.py", line 15, in <module>
from _pydevd_bundle.pydevd_constants import IS_JYTH_LESS25, IS_PY3K, IS_PY34_OR_GREATER, IS_PYCHARM, get_thread_id, \
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3.4\helpers\pydev\_pydevd_bundle\pydevd_constants.py", line 155, in <module>
from _pydev_imps._pydev_saved_modules import thread
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3.4\helpers\pydev\_pydev_imps\_pydev_saved_modules.py", line 21, in <module>
import xmlrpc.client as xmlrpclib
File "C:\Users\Ranger\AppData\Local\Programs\Python\Python36-32\lib\xmlrpc\client.py", line 135, in <module>
from decimal import Decimal
File "C:\Users\Ranger\AppData\Local\Programs\Python\Python36-32\lib\decimal.py", line 3, in <module>
from _decimal import *
AttributeError: module 'numbers' has no attribute 'Number'
Process finished with exit code 1
补充一下,这个是我按了debug时候显示的。但是实际Run的时候会输出正确结果。