zeppelin支持matplotlib配置
2016-12-12 19:19
260 查看
我的环境: python 2.7.10, zepplin 0.61
1. 需要python支持Tkinter. 这需要重新编译安装python
先查询系统中tk的版本:
[root@n2 ~]# rpm -qa | grep tk
tk-devel-8.5.7-5.el6.x86_64
tkinter-2.6.6-66.el6_8.x86_64
tk-8.5.7-5.el6.x86_64
下载python2.7.10源码,修改Modules/Setup.dist, 去掉如下所示的注释, 并修改tk的版本为8.5:
.......
# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-L/usr/local/lib \
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-I/usr/local/include \
# *** Uncomment and edit to reflect where your X11 header files are:
-I/usr/X11R6/include \
# *** Or uncomment this for Solaris:
.......
# *** Uncomment and edit to reflect your Tcl/Tk versions:
-ltk8.5 -ltcl8.5 \
......
2. 安装pip
因为自己编译的python不带有pip,我下的pip版本是 9.0.1.
下载pip,然后解压后进入pip目录,运行 python setup.py install安装pip
3. 安装libpng
我是下载 libpng-1.6.26.tar.xz 后,解压再 make install
4. 安装freetype
我是下载 freetype-2.6.5.tar.gz 后, 解压再 make install
5. 安装 matplotlib 1.5.0
pip --no-cache-dir install -U -i https://pypi.mirrors.ustc.edu.cn/simple matplotlib==1.5.0
注意:我一开始使用默认最新的1.5.3版本安装后,无法使用!
6. 安装 py4j
pip install py4j
5. 重启zeppelin,搞定!
注意: 以上步骤需要root 权限或者sudo.
1. 需要python支持Tkinter. 这需要重新编译安装python
先查询系统中tk的版本:
[root@n2 ~]# rpm -qa | grep tk
tk-devel-8.5.7-5.el6.x86_64
tkinter-2.6.6-66.el6_8.x86_64
tk-8.5.7-5.el6.x86_64
下载python2.7.10源码,修改Modules/Setup.dist, 去掉如下所示的注释, 并修改tk的版本为8.5:
.......
# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-L/usr/local/lib \
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-I/usr/local/include \
# *** Uncomment and edit to reflect where your X11 header files are:
-I/usr/X11R6/include \
# *** Or uncomment this for Solaris:
.......
# *** Uncomment and edit to reflect your Tcl/Tk versions:
-ltk8.5 -ltcl8.5 \
......
2. 安装pip
因为自己编译的python不带有pip,我下的pip版本是 9.0.1.
下载pip,然后解压后进入pip目录,运行 python setup.py install安装pip
3. 安装libpng
我是下载 libpng-1.6.26.tar.xz 后,解压再 make install
4. 安装freetype
我是下载 freetype-2.6.5.tar.gz 后, 解压再 make install
5. 安装 matplotlib 1.5.0
pip --no-cache-dir install -U -i https://pypi.mirrors.ustc.edu.cn/simple matplotlib==1.5.0
注意:我一开始使用默认最新的1.5.3版本安装后,无法使用!
6. 安装 py4j
pip install py4j
5. 重启zeppelin,搞定!
注意: 以上步骤需要root 权限或者sudo.
相关文章推荐
- windows下python配置numpy、matplotlib、scipy
- 安装配置Python+Numpy+Scipy+Matplotlib环境
- numpy、scipy、matplotlib安装与配置
- 搭建notepad++ python环境, 配置numpy 与 matplotlib
- Python中的Numpy、SciPy、MatPlotLib安装与配置
- numpy,scipy,matplotlib配置教程
- mac下配置matplotlib绘图
- 支持Python系列:Matlab的Python实现Scipy和Matplotlib简介
- Zeppelin下使用anaconda和matplotlib
- numpy和matplotlib在win下的配置
- python3使用matplotlib画图支持中文
- 修改配置文件matplotlibrc,让Matplotlib显示中文
- OpenCV 4 Python高级配置—安装setuptools,matplotlib,six,dateutil,pyparsing 完整过程
- linux下python3.4配置matplotlib的问题
- 广义mandelbrot集,使用python的matplotlib绘制,支持放大缩小
- Windows64+Python27下配置matplotlib
- 64位的win7配置python、pip、numpy、scipy、matplotlib
- Numpy、SciPy、MatPlotLib在Python2.7.9下的安装与配置
- Windows, Ubuntu 下 Numpy, Scipy, matplotlib, jupyter notebook 安装配置
- python下配置matplotlib开发环境