ubuntu 下 安装 anaconda3 以及使用

 

一、安装

参考资料:

https://blog.csdn.net/weixin_49223002/article/details/123031334   Ubuntu安装anaconda3

https://blog.csdn.net/anniaxie/article/details/107198266  ubuntu16.04下Anaconda3的使用

 

 

 

二、使用

1,添加环境变量

在~/.bashrc中添加export PATH="/home/xx/anaconda3/bin:$PATH" 

或者:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/zhuxuekui/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/zhuxuekui/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/zhuxuekui/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/zhuxuekui/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup

 

2,几个命令

conda create -n py38 python=3.8

conda env list

conda env remove -n py38

conda activate py38

conda deactivate

 

3,解决 conda init问题

https://blog.csdn.net/qq_33221533/article/details/100150534?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-100150534-blog-121601336.pc_relevant_aa&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-100150534-blog-121601336.pc_relevant_aa&utm_relevant_index=1

正确解决CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.

source activate ;conda deactivate; conda activate py38

 

posted on 2022-08-10 23:48  zhuxuekui3  阅读(369)  评论(0编辑  收藏  举报