import subprocess
subprocess.run('C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MetaTrader 5')
以上のようにjupyterで入力したのですが以下の様にwindowsに関するエラーが生じました。
Python
1FileNotFoundError Traceback (most recent call last) 2<ipython-input-3-e8bf344a5c95> in <module>() 3 1 import subprocess 4----> 2 subprocess.run(r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MetaTrader 5') 5 6~\Anaconda3\envs\tensorflow16\lib\subprocess.py in run(input, timeout, check, *popenargs, **kwargs) 7 401 kwargs['stdin'] = PIPE 8 402 9--> 403 with Popen(*popenargs, **kwargs) as process: 10 404 try: 11 405 stdout, stderr = process.communicate(input, timeout=timeout) 12 13~\Anaconda3\envs\tensorflow16\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors) 14 707 c2pread, c2pwrite, 15 708 errread, errwrite, 16--> 709 restore_signals, start_new_session) 17 710 except: 18 711 # Cleanup if the child failed starting. 19 20~\Anaconda3\envs\tensorflow16\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session) 21 995 env, 22 996 os.fspath(cwd) if cwd is not None else None, 23--> 997 startupinfo) 24 998 finally: 25 999 # Child is launched. Close the parent's copy of those pipe 26 27FileNotFoundError: [WinError 2] 指定されたファイルが見つかりません。
似たような質問はあったのですが実行してみても改善しませんので教えて頂けると有難いです。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/10/06 08:58