Anaconda安装

Anaconda安装

https://www.anaconda.com/download#downloads
官网下载地址下载安装包再用xftp传输到需要安装的机器上

也可以使用wget+下载地址直接下载
安装
bash 下载的.sh文件
一路回车直到出现
Do you accept the license terms? [yes|no]
[no] >>> 
输入yes确认
安装位置选择
Anaconda3 will now be installed into this location:
/home/export/base/yxsc/zhouj/anaconda3

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

[/home/export/base/yxsc/zhouj/anaconda3] >>>

重新更改位置直接在>>>后面加上需要安装的位置

等待安装
安装完成后会显示
Installing base environment...


Downloading and Extracting Packages


Downloading and Extracting Packages

Preparing transaction: done
Executing transaction: | 

    Installed package of scikit-learn can be accelerated using scikit-learn-intelex.
    More details are available here: https://intel.github.io/scikit-learn-intelex

    For example:

        $ conda install scikit-learn-intelex
        $ python -m sklearnex my_application.py

    
                                                                                                                                                       ne
installation finished.
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> 

这里yes就帮你配置环境变量,如果你想要自己手动配置环境变量就选择no


安装完成
==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup, 
   set the auto_activate_base parameter to false: 

conda config --set auto_activate_base false

Thank you for installing Anaconda3!

查看版本
conda --version

打包环境

conda activate r
进入r环境
conda pack -n r -o zhouj-r.tar.gz
-n + 环境名称
-o + 打包名称

使用打包环境

进入到anaconda3文件夹下的envs目录中去
mkdir r

将打包的压缩包解压到这个文件夹下
tar -zxvf zhouj-r.tar.gz -C /path/anaconda3/envs/r
具体路径自行查找
解压完成后conda info --envs查看是否环境存在

删除conda环境

conda remove --n r --all
删除r环境下所有信息

问题

解包后R语言环境无法进入R
错误提示:
/home/export/base/yxsc/zhouj/online1/zhouj/anaconda3/envs/r/bin/R:行240: /opt/anaconda1anaconda2anaconda3/lib/R/etc/ldpaths: 没有那个文件或目录
ERROR: R_HOME ('/opt/anaconda1anaconda2anaconda3/lib/R') not found

这里是R的位置发生了变化,修改R包所在位置
vim /path/anaconda3/envs/r/bin/R
修改R_HOME_DIR=/path/anaconda3/envs/r/lib/R
退出保存 执行R,成功进入

博客: http://zhouj.club/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值