Python ImportError:没有名为system的模块

时间:2014-03-24 13:26:57

标签: system

import system module does not work in python2.7.3 

Python 2.7.3(默认,2014年3月13日,11:03:55)

[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

 >>> import system
 Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named system

1 个答案:

答案 0 :(得分:2)

如果您需要sys模块,请尝试:

import sys

如果您正在寻找系统调用,请尝试:

import os.system