获取资源加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