前言
一直以来都是使用的virtualenv和virtualenvwrapper来管理Python虚拟环境,个人觉得非常好使。今天换个口味,安装一次anaconda,记录如下。
下载
前往清华大学开源软件镜像站(https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/)下载anaconda的安装包。因为我的系统为Ubuntu,所以我这里选择的是Anaconda3-5.3.1-Linux-x86_64.sh。
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh
安装
运行安装指令。
sh Anaconda3-5.3.1-Linux-x86_64.sh
运行到第一次需要选择的地方,此处按下回车键继续即可。
Welcome to Anaconda3 5.3.1
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
后续便是阅读协议,连续使用回车键阅读,阅读到底部时会询问是否接受协议,此处选择yes。
Do you accept the license terms? [yes|no]
[no] >>>
再后续便是选择安装路径,可以改也可以不改,我这里使用的是默认的路径。
Anaconda3 will now be installed into this location:
/home/zhanghuanrong/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/home/zhanghuanrong/anaconda3] >>>
经过一段时间的安装后,安装程序会询问是否将相关启动和变量信息写入.bashrc文件,此处选择yes。
Do you wish the installer to initialize Anaconda3
in your /home/zhanghuanrong/.bashrc ? [yes|no]
[no] >>>
最后,当被询问是否安装vscode时,选择no。
Anaconda is partnered with Microsoft! Microsoft VSCode is a streamlined
code editor with support for development operations like debugging, task
running and version control.
To install Visual Studio Code, you will need:
- Administrator Privileges
- Internet connectivity
Visual Studio Code License: https://code.visualstudio.com/license
Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]
>>>
在安装完成后,source一下。
source ~/.bashrc
换源
我这里参考的是https://blog.csdn.net/qq_43597899/article/details/105571688。