RT-thread 利用Scons 工具编译提示python编码错误解决办法
2015-11-16 12:49
971 查看
错误信息:
scons: Reading SConscript files ...
UnicodeDecodeError: 'ascii' codec can't decode byte 0xbd in position 9: ordinal
not in range(128):
原因:
安装的python2.7.9版本在win8系统下的Bug,需要指定python的编码格式。
解决方法:
1、在python 安装目录下的Lib/site-packages 文件夹下新建sitecustomize.py 脚本.
2、在该脚本中填充:
import sys
sys.setdefaultencoding('gb2312')
相关文章推荐
- WebDriver中自动识别验证码--Python实现
- python中xrange和range的异同
- [转] Python特殊语法:filter、map、reduce、lambda
- python3基本爬虫
- Python文件\文件夹操作—OS, File, Shutil
- python中若干高级编程技巧
- Python 安装Twisted 提示python version 2.7 required,which was not found in the registry
- Python运行时的常见错误
- File Processing by Python
- LeetCode OJ 系列之228 Summary Ranges --Python
- python3.5 + selenium环境搭建
- 7种python 可视化 库的比较(针对同一数据画图)
- 学习python(一)
- python入门
- Python的Flask开发框架简单上手笔记
- Python通过DOM和SAX方式解析XML的应用实例分享
- 详解在Python程序中解析并修改XML内容的方法
- python多线程
- python多进程
- Python语言精要