Windows PowerShell
版权所有(C) Microsoft Corporation。保留所有权利。
安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows
PS D:\projects\learnYolo\yolov5-5.0> conda activate pytorch
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- cmd.exe
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
如果使用pycharm终端激活pytorch(conda activate <虚拟环境名称>)虚拟环境时,出现上述问题,大概率是终端选择的锅
解决方法1
将pycharm的默认终端修改为cmd.exe(文件->工具->终端->shell路径)
解决方法2
直接打开终端,点击小箭头,选择Commend Prompt即可
标签:CommandNotFoundError,use,shell,init,activate,conda,终端,your From: https://blog.csdn.net/qq_61585497/article/details/143453768