pythonサブプロセスFileNotFoundError:[WinError2]システムは指定されたファイルを見つけることができません。-解決

問題

Traceback (most recent call last):
  File "rtmp.py", line 26, in <module>
    pipe = subprocess.Popen(command, shell=False, stdin=subprocess.PIPE)
  File "D:\software\developUtils\python\python3.7\lib\subprocess.py", line 756, in __init__
    restore_signals, start_new_session)
  File "D:\software\developUtils\python\python3.7\lib\subprocess.py", line 1155, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

解決

  1. libフォルダーでsubprocess.pyを見つけます
  2. クラスPopen(object)を検索します。
  3. __init__のshell = Falseをshell = Trueに変更します

おすすめ

転載: blog.csdn.net/qq122716072/article/details/108967504