您的位置:首页 > 科技 > IT业 > Ubuntu安装Anaconda3

Ubuntu安装Anaconda3

2024/10/6 6:03:42 来源:https://blog.csdn.net/xhtchina/article/details/141159524  浏览:    关键词:Ubuntu安装Anaconda3

1. 下载Anaconda

下载地址:

Anaconda | Anaconda Distribution

下载适合电脑Python版本和计算平台的版本。

2. 推荐切换到国内源

anaconda的源改为国内镜像, 配置文件是~/.condarc

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/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes

pip源改为国内镜像, 配置文件是~/.pip/pip.conf, 该后的文件内容如下:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
[install]
trusted-host=https://pypi.tuna.tsinghua.edu.cn

update conda

conda update conda -y
conda update anaconda -y
conda update python -y
conda update --all -y

3. 安装 Anaconda

bash Anaconda3-5.3.0-Linux-x86_64.sh # make sure append the Anaconda executable 

一直按回车 

遇到下面的提示,按回车会安装到默认目录;

如果系统安装盘不够大,建议安装在其它挂载盘上,这里输入你想要安装的目录,然后按回车。

Anaconda3 will now be installed into this location:
/home/xxx/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

遇到下面的信息表示安装成功

no change     /home/xueht/disk/anaconda3/condabin/conda
no change     /home/xueht/disk/anaconda3/bin/conda
no change     /home/xueht/disk/anaconda3/bin/conda-env
no change     /home/xueht/disk/anaconda3/bin/activate
no change     /home/xueht/disk/anaconda3/bin/deactivate
no change     /home/xueht/disk/anaconda3/etc/profile.d/conda.sh
no change     /home/xueht/disk/anaconda3/etc/fish/conf.d/conda.fish
no change     /home/xueht/disk/anaconda3/shell/condabin/Conda.psm1
no change     /home/xueht/disk/anaconda3/shell/condabin/conda-hook.ps1
no change     /home/xueht/disk/anaconda3/lib/python3.12/site-packages/xontrib/conda.xsh
no change     /home/xueht/disk/anaconda3/etc/profile.d/conda.csh
modified      /home/xueht/.zshrc==> For changes to take effect, close and re-open your current shell. <==Thank you for installing Anaconda3!

 启动

directory to your PATH environment variable in .bashrc
source ~/.bashrc
python --version # to show the python version

参考文献

https://www.pugetsystems.com/labs/hpc/Install-TensorFlow-with-GPU-Support-the-Easy-Way-on-Ubuntu-18-04-without-installing-CUDA-1170/

Ubuntu18.04 + NVidia显卡 + Anaconda3 + Tensorflow-GPU 安装、配置、测试 (无需手动安装CUDA) - xbit - 博客园

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com