今天执行python,报错:AttributeError: 'module' object has no attribute 'call'
原因:你的程序文件名是 subprocess.py,导致 import subprocess 导入的不是 Python 中的 subprocess 而是你的这个文件,然而你的文件中没有 call。
解决方法:文件名不要与 Python 中的模块名相同。
今天执行python,报错:AttributeError: 'module' object has no attribute 'call'
原因:你的程序文件名是 subprocess.py,导致 import subprocess 导入的不是 Python 中的 subprocess 而是你的这个文件,然而你的文件中没有 call。
解决方法:文件名不要与 Python 中的模块名相同。