Ubuntu20.04安装启动配置Anaconda3

前言
由于Ubuntu20.04最新版本预安装了Python3.8, 版本号是python3.8.2, 版本太高,在开发pyspark程序时会遇到各种莫名的错误,但是Ubuntu的有系统有的包需要依赖python3.8,所以下面介绍如何在保持python3.8不变的情况下安装配置Anaconda3。

Ubuntu20.04自带python版本
Anaconda可以便捷获取包且对包能够进行管理,同时对环境可以统一管理的发行版本。Anaconda包含了conda、Python在内的超过180个科学包及其依赖项。可以前往Anaconda官网(
https://www.anaconda.com/products/individual)地址下载:

Anaconda版本信息
由于我使用的是Ubuntu系统,所以我选择下载的Linux下面的安装包。
安装配置
- 找到下载好的压缩包所在的目录
bash Anaconda3-2020.02-Linux-x86_64.sh

在提示符下一路回车,需要输入的地方就输入"yes",安装好以后,Anaconda3自动会添加好环境变量,如果没有添加好,可自行添加:
[hadoop@node1~] gedit ~/.bashrc
# 配置你的Anaconda
export PATH="/home/hadoop/anaconda3/bin:$PATH
# 保存环境变量的修改
source ~/.bashrc
使用jupyter notebook
Anaconda包含Jupyter Notebook(IPython),是一个交互式笔记本,支持运行 40 多种编程语言,下面我们来试试。
在终端输入下面命令:
hadoop@node1:~$ jupyter-notebook
系统会自动弹出窗口:

jupyter notebook
至此,Anaconda3在Ubuntu上安装配置完成。
相关推荐
-
PHP8种变量类型的详细讲解2025-02-22 00:32:24
-
php+apache 和 php+nginx的区别2025-02-22 00:21:27
-
PHP:与workerman结合实现定时任务2025-02-22 00:15:57
-
Nginx的Rewrite规则与实例2025-02-22 00:15:39
-
MySql中身份证字段的简单脱敏介绍2025-02-22 00:15:36