您当前的位置: 首页 >  conda

Xavier Jiezou

暂无认证

  • 1浏览

    0关注

    394博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘

Xavier Jiezou 发布时间:2022-03-30 23:11:26 ,浏览量:1

问题描述

用 conda 创建了一个新环境,无法激活,报错信息如下。

$ conda activate env_name

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 

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'.
原因分析

脚本执行策略受限。

解决方案

以管理身份运行 Windows 终端,执行 set-ExecutionPolicy RemoteSigned 命令,然后输入 Y(是)。

PS C:\Windows\system32> set-ExecutionPolicy RemoteSigned

执行策略更改
执行策略可帮助你防止执行不信任的脚本。更改执行策略可能会产生安全风险,如 https:/go.microsoft.com/fwlink/?LinkID=135170
中的 about_Execution_Policies 帮助主题所述。是否要更改执行策略?
[Y] 是(Y)  [A] 全是(A)  [N] 否(N)  [L] 全否(L)  [S] 暂停(S)  [?] 帮助 (默认值为“N”): Y
引用参考

https://blog.csdn.net/qq_42951560/article/details/123859735

关注
打赏
1661408149
查看更多评论
立即登录/注册

微信扫码登录

0.0833s