I'm newbie to python. Recently I practiced module subprocess, but I got an ImportError when I use from subprocess import Popen
, the error message said: ImportError: cannot import name Popen
.
My python version info is Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
, and my OS is centOS.
I searched for help using both Google and stackoverflow, but didn't find the answer. Can you give me some instruction? Thanks very much~
//============================
update:
As @BorrajaX commended below, I named a file in working directory as subprocess.py
, which shadowed the 'offical' subprocess module.
This question is solved, Thank you all~