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

欢迎关注我的公众号“灯珑”,让我们一起了解更多的事物~

你也可能喜欢

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注