Failed : 无法将“Failed”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写。+ Failed to activate conda environmen

文章指出,由于PyCharm默认使用WindowsPowerShell,导致无法激活conda环境。为解决此问题,用户需将PyCharm的终端设置改为cmd.exe。具体操作路径为:进入PyCharm的设置,选择Tools>Terminal,然后将ShellPath设置为cmd.exe。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Failed : 无法将“Failed”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1

  • Failed to activate conda environment.
  •   + CategoryInfo          : ObjectNotFound: (Failed:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

Please : 无法将“Please”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:2 字符: 2

  • Please open Anaconda prompt, and run conda init powershell there.
  •  + CategoryInfo          : ObjectNotFound: (Please:String) [], CommandNotFoundException
     + FullyQualifiedErrorId : CommandNotFoundException
    
    

出现以上问题的原因是“pycharm 默认的终端是 Windows PowerShell,而pycharm 终端无法激活conda环境”,因此,将pycharm的终端设置为 cmd.exe即可。

具体方法为:进入pycharm——》file——》settings——》tools——》Terminal,将“Shell Path”设置为“cmd.exe”即可

评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值