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"
CentOS7 matplotlib notebook 安装和使用
最新推荐文章于 2025-03-22 19:06:38 发布