• conda activate激活环境出错的解决办法


    出现错误情况:

    今天在使用Anaconda激活python3.6环境的时候出现了如下错误:

    [zsq@localhost ~]$ conda activate python36
    
    CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
    To initialize your shell, run
    
        $ conda init <SHELL_NAME>
    
    Currently supported shells are:
      - bash
      - 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'.
    ————————————————
    版权声明:本文为CSDN博主「云外孤鸟」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_33825817/article/details/88959785
    

    google一番发现了几个解决办法,但是还是没能成功解决。后面仔细想想,发现是上次ssh连接该服务器使用conda activate python36命令激活环境后未使用conda deactivate退出环境就关闭终端导致的。

    发现这个问题后,解决思路就比较明显了,重新激活一下环境就好了,具体操作如下:

    # 重新进入虚拟环境
    source activate
    # 退出虚拟环境
    conda deactivate
    

    最后,重新执行conda activate python36,没有报错,成功进入该虚拟环境。

  • 相关阅读:
    MySQL中MyISAM为什么比InnoDB查询快
    .Net Core导入千万级数据至Mysql
    细说MySql索引原理
    原生Swagger界面太low(推荐)
    开源分布式调度系统分享(ScheduleMaster)
    tfs agent cicd 自动编译 xcpoy失败
    .net 网站
    Android App Arch
    Android 多进程引发的一次crash
    Scrapy 抓取数据入门操作
  • 原文地址:https://www.cnblogs.com/shuimuqingyang/p/14703883.html
Copyright © 2020-2023  润新知