CentOS7虚拟机安装Python 2.7.13 |Anaconda 4.4.0 (64-bit)

系统:centOS7 Minimal (因为这个里面什么都要重新安装)

在上一篇文章中弄好了远程连接之后,这一篇安装Python 2.7.13 |Anaconda 4.4.0 (64-bit)
那么在安装之前我们需要通过yum来安装一些包,以供等下的下载:

yum install pip  # python安装工具
yum install vim  # 安装vim编译器(不安装直接vi也行)
yum install wget  # 用于从网上下载包
yum install git  # 用于从github上下载包
yum install -y bzip2  # 安装anaconda2的时候需要,不然会报错

下载Anaconda(文件默认保存在当前目录)

wget https://repo.continuum.io/archive/Anaconda2-4.4.0-Linux-x86_64.sh

输入安装命令

bash Anaconda2-4.4.0-Linux-x86_64.sh

根据提示按ENTER

Welcome to Anaconda2 4.4.0 (by Continuum Analytics, Inc.)

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>

根据提示输入yes,同意license agreement

... ...
kerberos (krb5, non-Windows platforms)
A network authentication protocol designed to provide strong authentication
for client/server applications by using secret-key cryptography.

cryptography
A Python library which exposes cryptographic recipes and primitives.

Do you approve the license terms? [yes|no]
>>> yes

直接ENTER键,用默认的安装路径

Anaconda2 will now be installed into this location:
/root/anaconda2

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

[/root/anaconda2] >>>

写入环境变量,直接输入yes (这样就不用手动添加环境变量了)

... ...
installing: zlib-1.2.8-3 ...
installing: anaconda-4.4.0-np112py27_0 ...
installing: conda-4.3.21-py27_0 ...
installing: conda-env-2.6.0-0 ...
Python 2.7.13 :: Continuum Analytics, Inc.
creating default environment...
installation finished.
Do you wish the installer to prepend the Anaconda2 install location
to PATH in your /root/.bashrc ? [yes|no]
[no] >>> yes

生效.bashrc文件

[root@master tmp]# source ~/.bashrc

输入python,验证环境

Python 2.7.13 |Anaconda 4.4.0 (64-bit)| (default, Dec 20 2016, 23:09:15) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>>

这样的话就安装成功了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值