2020-03-03 python 报错 [WinError 2] 系统找不到指定的文件。

File "I:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\subprocess.py",
根据提示找到lib中的subprocess.py文件,CTRL+f查找class Popen模块,再将这个模块中的
init函数中的shell = False 改成shell = True

来源:https://blog.csdn.net/weixin_44853744/article/details/102680386

  File "I:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "I:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "I:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。