0

I have a problem when run the code below in Window OS using Python 3.6 32bit.

subprocess.call(["mkdir", "-p", path_results + "it" + str(actual_iteration)])

The error is

Trackback : ......\Python36-32\lib\subprocess.py", line 997, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified.

Anyone please tell me what's wrong and help me fix it. Thank you.

Gwen
  • 1
  • 1
    There's no `mkdir` program, so you can't start it as a subprocess. If you want to create a directory, why don't you do that with python? – Aran-Fey Apr 24 '18 at 12:02
  • May I know how to create directory using python? Is there any other method to do it if I still want to use the subprocess.call() ? – Gwen Apr 24 '18 at 12:04
  • 1
    [How can I create a directory if it does not exist?](//stackoverflow.com/q/273192) – Johnny Mopp Apr 24 '18 at 12:06
  • [If you want to use `subprocess.Popen` for some weird reason](https://stackoverflow.com/questions/35046004/subprocess-filenotfound) – Aran-Fey Apr 24 '18 at 12:09

0 Answers0