You need to enable JavaScript to run this app. Win10 PATH环境变量被setx误改损坏 如何修复并添加Selenium路径
优惠活动
大模型
产品
解决方案
定价
更多

Win10 PATH环境变量被setx误改损坏 如何修复并添加Selenium路径

Win10修改PATH环境变量后Python命令失效问题

故障说明

  • 曾执行命令 setx path "%path%;c:\directoryPath",尝试将Selenium相关内容加入系统PATH环境变量
  • 命令执行结束后,原本可正常运行的 python、pip install ... 等命令全部报错,报错原文为:

python : The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • 执行上述修改命令前,所有Python相关命令均可正常调用
  • 初步排查发现,在PowerShell中执行 echo $PATH 无任何路径输出,结果为空
  • 附系统环境变量配置界面截图:环境变量截图

核心需求

  • 如何修复、还原已被损坏的PATH环境变量
  • 如何在Win10系统中正确将selenium.exe添加到PATH环境变量

内容的提问来源于stack exchange,提问作者peng Jack

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.11.18 17:45:04