Subprocess is a module. You need to import it.
Put this as the second line in your file: import subprocess
import subprocess
2.1m questions
2.1m answers
60 comments
56.9k users