- 论坛徽章:
- 0
|
RT!
我是菜鸟。win2008 R2上安装的activepython2.6.4.8
看视频教程,准备import一个模块时候发生了错误。
PS C:\Users\Administrator> python
ActivePython 2.6.4.8 (ActiveState Software Inc.) based on
Python 2.6.4 (r264:75706, Nov 3 2009, 14:24:0 [MSC v.1500 64 bit (AMD6
Type "help", "copyright", "credits" or "license" for more information.
>>> a=decimal.decimal(1.1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'decimal' is not defined
提示需要导入,于是
>>> import(decimal)
File "<stdin>", line 1
import(decimal)
^
SyntaxError: invalid syntax
>>> import (decimal)
File "<stdin>", line 1
import (decimal)
^
SyntaxError: invalid syntax
还是不行!!!! |
|