Chinaunix首页 | 论坛 | 博客
  • 博客访问: 449149
  • 博文数量: 80
  • 博客积分: 2301
  • 博客等级: 大尉
  • 技术积分: 884
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-16 20:07
个人简介

I\'m interested in mathematics and Daoism. Welcome to talk about these subjects with me.

文章分类

全部博文(80)

文章存档

2017年(2)

2016年(16)

2015年(4)

2014年(6)

2013年(22)

2012年(2)

2011年(1)

2010年(4)

2009年(20)

2008年(2)

2007年(1)

我的朋友

分类: Python/Ruby

2017-09-21 10:18:21

在服务器环境下,可能没有安装xwindow.这时使用matplotlib来绘图的话,可能会遇到如下的错误:
_tkinter.TclError: no display name and no $DISPLAY environment variable

只需要修改配置文件即可
/etc/matplotlibrc

如果不知道这个配置文件在哪里,可以在python解释器中输入如下的命令来获知:
>>>import matplotlib
>>>matplotlib.matplotlib._fname()


阅读(1320) | 评论(0) | 转发(0) |
0

上一篇:python3 重新编译

下一篇:没有了

给主人留下些什么吧!~~