找不到Conda命令,路径在.bashrc中 [英] Conda command not found, path is in .bashrc
问题描述
操作系统:基本
安装anaconda3后,运行conda命令将显示:
After installing anaconda3, running conda command displays:
conda: command not found
.bashrc中的路径已附加正确的用户名.
The path in .bashrc has been appended with proper username.
.bashrc的一部分
Part of .bashrc
enter c __el_LAST_EXECUTED_COMMAND="${BASH_COMMAND}"
printf "\033]0;%s\007" "$1"
}
# Show the currently running command in the terminal title:
# http://www.davidpashley.com/articles/xterm-titles-with-bash.html
update_tab_command()
{
# catch blacklisted commands and nested escapes
case "$BASH_COMMAND" in
*\033]0*|update_*|echo*|printf*|clear*|cd*)
__el_LAST_EXECUTED_COMMAND=""
;;
*)
put_title "${BASH_COMMAND}"
;;
esac
}
preexec_functions+=(update_tab_command)
;;
*)
;;
esac
# added by Anaconda3 2.4.0 installer
export PATH="/home/my_name/anaconda3/bin:$PATH"
也:
echo $PATH
usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
推荐答案
在.bashrc或.bash_profile文件中设置正确的路径,如果在主文件夹中安装了anaconda,则export PATH=/anaconda3/bin:$PATH
可以使用.不要在路径中添加"../".确保从网络复制路径时,所有内容均正确粘贴在bash文件中,并且区分大小写和字体.执行完此操作后,打开一个新终端并键入source activate base
或source activate root
,然后首次使用conda命令.键入conda -V
进行检查,它应显示'conda version_number'
Set the correct path in the .bashrc or .bash_profile file, export PATH=/anaconda3/bin:$PATH
works if you have installed anaconda in the home folder. Do not add '../' to the path. Make sure that while copying the path from the web everything is pasted correctly in the bash file, it is case and font sensitive. After doing this, open a new terminal and type source activate base
or source activate root
before using conda command for the first time. Check by typing conda -V
and it should display 'conda version_number'
这篇关于找不到Conda命令,路径在.bashrc中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!