CentOS7 matplotlib notebook 安装和使用

本文介绍了如何在Spark环境中配置并启动Jupyter Notebook,包括必要的软件包安装步骤及解决启动过程中遇到的问题,如环境变量设置等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

yum install freetype freetype-devel python-freetype
 yum install libpng libpng-devel python-pypng  
pip3 install matplotlib
pip install ipython jupyter notebook

在spark中启动ipython
启动的命令为IPYTHON_OPTS="notebook --ip=1.2.3.4" pyspark
需要提前安装ipython。推荐使用Anaconda进行安装。

在spark2.0之后的版本,使用上述命令会报错:

[xdwang@dell bin]$ IPYTHON_OPTS="notebook --ip=211.71.76.25" ./pyspark
Error in pyspark startup:
IPYTHON and IPYTHON_OPTS are removed in Spark 2.0+. Remove these from the environment and set PYSPARK_DRIVER_PYTHON and PYSPARK_DRIVER_PYTHON_OPTS instead.
解决方案
修改profile
export PYSPARK_DRIVER_PYTHON=jupyter  
export PYSPARK_DRIVER_PYTHON_OPTS="notebook --ip=211.71.76.25"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值