zl程序教程

您现在的位置是:首页 >  系统

当前栏目

linux安装anaconda3

Linux安装 anaconda3
2023-06-13 09:14:15 时间

linux安装anaconda3有一些坑,需要注意。

1、下载了anaconda3的安装包之后,不要用sudo来运行,直接bash就好。不然会安装到root目录下面,然后就会出现普通用户没法使用conda的情况。

2、要是conda命令用不了,就在控制台运行

echo 'export PATH="/home/你的用户名/anaconda3/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

3、卸载直接rm -rf就好了。

切换到国内源:

conda切换到国内源:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r

conda config --add channels  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
conda config --set show_channel_urls yes
conda clean -i

pip切换为国内源

pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

转载请注明来源:https://www.longjin666.top/?p=883