contOS7 安装Anaconda教程

获取资源加qq:258167139

1.上传安装包:

上传: Anaconda3-2021.05-Linux-x86_64.sh文件到Linux服务器上
安装:
sh ./Anaconda3-2021.05-Linux-x86_64.sh
在这里插入图片描述
输入yes后就安装完成了.
安装完成后, 退出SecureCRT 重新进来:
看到这个Base开头表明安装好了.
在这里插入图片描述
base是默认的虚拟环境.

2.换国内源

  • 如果你安装好后, 没有出现base, 可以打开:/root/.bashrc这个文件, 追加如下内容:

2.1编辑文件vim ~/.condarc直接粘贴复制进去就行

channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

2.2验证python环境

(base) [root@6274master ~]# vim ~/.condarc
(base) [root@6274master ~]# python
Python 3.8.8 (default, Apr 13 2021, 19:58:26) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
# 基于Anaconda的python

3.创建虚拟环境pyspark

(base) [root@6274master ~]# # pyspark
(base) [root@6274master ~]# conda create -n pyspark python=3.8
  • 选权限的时候选择yes
  • 安装成功切换pyspark环境的时候使用conda activate pyspark
Downloading and Extracting Packages
openssl-1.1.1l       | 2.5 MB    | ######################################################################### | 100% 
libstdcxx-ng-9.3.0   | 3.1 MB    | ######################################################################### | 100% 
pip-21.2.4           | 1.8 MB    | ######################################################################### | 100% 
zlib-1.2.11          | 108 KB    | ######################################################################### | 100% 
libgomp-9.3.0        | 311 KB    | ######################################################################### | 100% 
readline-8.1.2       | 363 KB    | ######################################################################### | 100% 
python-3.8.12        | 18.3 MB   | ######################################################################### | 100% 
tk-8.6.11            | 3.0 MB    | ######################################################################### | 100% 
xz-5.2.5             | 341 KB    | ######################################################################### | 100% 
ncurses-6.3          | 782 KB    | ######################################################################### | 100% 
wheel-0.37.1         | 33 KB     | ######################################################################### | 100% 
setuptools-58.0.4    | 790 KB    | ######################################################################### | 100% 
ca-certificates-2021 | 115 KB    | ######################################################################### | 100% 
libffi-3.3           | 50 KB     | ######################################################################### | 100% 
sqlite-3.37.0        | 999 KB    | ######################################################################### | 100% 
ld_impl_linux-64-2.3 | 586 KB    | ######################################################################### | 100% 
_openmp_mutex-4.5    | 22 KB     | ######################################################################### | 100% 
libgcc-ng-9.3.0      | 4.8 MB    | ######################################################################### | 100% 
_libgcc_mutex-0.1    | 3 KB      | ######################################################################### | 100% 
certifi-2021.10.8    | 151 KB    | ######################################################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate pyspark
#
# To deactivate an active environment, use
#
#     $ conda deactivate

4.Anaconda安装完成

5.注意事项

5.1python 版本3.8,Hadoop3.0以上提前安装好

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

大白菜程序猿

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值