linux下centos7安装conda

1、准备

安装前准备:

[wutongyu@localhost Documents]$ ls
Anaconda3-5.3.1-Linux-x86_64.sh

2、安装

[wutongyu@localhost Documents]$ bash 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
>>> 
===================================
Anaconda End User License Agreement
===================================

Copyright 2015, Anaconda, Inc.
......
cryptography
    A Python library which exposes cryptographic recipes and primitives.


Do you accept the license terms? [yes|no]
[no] >>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
......

注意:在后面选择是否配置路径时,选yes

Do you wish the installer to initialize Anaconda3
in your /home/wutongyu/.bashrc ? [yes|no]
[no] >>> yes

最后会有是否选择安装VSCode,根据个人情况自行选择即可。

Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]
>>> no

3、环境创建

如出现如下情况:

[wutongyu@localhost 环境]$ conda create -n python3_2 python=3
bash: conda: command not found...

有以下问题可能出现上面的问题:

  • 未安装python
[wutongyu@localhost Documents]$ sudo yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
[wutongyu@localhost Documents]$ tar -zxvf Python-3.6.5.tgz
[wutongyu@localhost Documents]$ cd Python-3.6.5/
[wutongyu@localhost Documents]$ ./configure && make && make install
[wutongyu@localhost Documents]$ python3
  • anaconda未加入到系统路径中
    解决:
    安装python,并查看 ~/.bashrc 文件下是否有 \export PATH="/home/wutongyu/anaconda3/bin:$PATH"
    没有的话在最后一行添加路径。然后source,使路径生效
[wutongyu@localhost Python-3.6.5]$ sudo vim ~/.bashrc
[sudo] password for wutongyu: 
[wutongyu@localhost Python-3.6.5]$ source ~/.bashrc
[wutongyu@localhost Python-3.6.5]$ anaconda -V
anaconda Command line client (version 1.7.2)

环境创建

[wutongyu@localhost 环境]$ conda create -n python3_2 python=3
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.5.11
  latest version: 4.9.0

Please update conda by running

    $ conda update -n base -c defaults conda
......
# 依据提示,使环境生效
# To activate this environment, use
#
#     $ conda activate python3_2
#
# To deactivate an active environment, use
#
#     $ conda deactivate
[wutongyu@localhost 环境]$ conda activate python3_2
(python3_2) [wutongyu@localhost 环境]$ 
# 环境搭建成功
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值