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
Conda command not working on macOS
提问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.
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.
回答by hnicke
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.
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.
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.
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.