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”即可