美文网首页
mac系统下conda:command not found报错的

mac系统下conda:command not found报错的

作者: 莫怂 | 来源:发表于2019-04-19 19:29 被阅读0次

    今天在用conda安装scikit-learn时,出现报错提示:

    conda:command not found

    因为之前是安装过的anaconda的,所以初步估计是因为某些操作,让conda的路径无法识别。查了下资料,在官网找到了解决方案

    解决方法

    手动重新添加PATH

    1.在终端terminal中操作,找到文件.bash_profile(macOS),用文本编辑器打开,转到主目录并打开名为的文件 。

    cd ~

    # .bash_profile为隐藏文件,-a为全部显示

    ls -a 

     # 我的文本编辑器为atom,用atom打开文本,

    atom .bash_profile

    2.在此文件中末尾添加下列行。保存文本,重新打开terminal,测试conda相关命令,问题解决。

    # 需将<path-to-anaconda>替换为已安装的anaconda文件的实际路径。

    export PATH="<path to anaconda>bin:$PATH"

    注意:如果在关闭并打开终端窗口后,conda仍然不起作用,则可能需要重新启动计算机。

    添加到最后一行

    相关文章

      网友评论

          本文标题:mac系统下conda:command not found报错的

          本文链接:https://www.haomeiwen.com/subject/shucgqtx.html