bash Conda command not working on macOS

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/51338768/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 16:58:35  来源:igfitidea点击:

Conda command not working on macOS

bashmacosanacondaconda

提问by ahmadabdullah247

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. enter image description here

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. enter image description here

回答by hnicke

You are not using bashbut zshas your current shell. zshdoes not source .bash_profile- instead, it sources the .zprofilefile for its initialization.

You are not using bashbut zshas your current shell. zshdoes not source .bash_profile- instead, it sources the .zprofilefile for its initialization.

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

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