首页 > 编程语言 > 详细

Solution for Python Extention matplotlib.pyplot loading Error

时间:2015-03-10 20:58:54      阅读:319      评论:0      收藏:0      [点我收藏+]

When I execute the following python instruction in python shell
 
>>>import matplotlib.pyplot as plt

error occured and the error message show as follows,
"UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0xea in position 0: ordinal not in range(128)"

Solution:
Before execution of import instruction, add this set of instructions:
 
>>> import sys
>>> reload(sys)
>>> sys.setdefaultencoding(‘utf-8‘)

Solution for Python Extention matplotlib.pyplot loading Error

原文:http://www.cnblogs.com/NetElite/p/4326831.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!