Conda命令不适用于macOS [英] Conda command not working on macOS

查看:95
本文介绍了Conda命令不适用于macOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在macOS上安装了Anaconda。它安装成功,但是当我在终端中运行命令时,它无法识别命令 conda 。在最初的搜索中,我发现是否在 .bash_profile 中设置了环境变量。如下图所示,路径已全部设置,但是我仍然无法运行命令。

I installed Anaconda on macOS. It installed successfully, but when I ran the command in terminal it does not recognize the command conda. On my initial search, I found out I have look if the environment variable is set in .bash_profile. As the following picture shows the path is all set, but I can not still run the command.

推荐答案

您没有使用 bash ,但将 zsh 作为当前shell。
zsh 不获取 .bash_profile -而是获取 .zprofile 文件进行初始化。

You are not using bash but zsh as your current shell. zsh does not source .bash_profile - instead, it sources the .zprofile file for its initialization.

因此,只需复制 export PATH = ... 插入 .zprofile 文件(如果不存在,请创建该文件)。注销并登录,它应该可以工作。

So, just copy the export PATH=... line to the .zprofile file (create it if it does not exist). Logout and login, and it should work.

这篇关于Conda命令不适用于macOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆