pip安装python包出错:ctype = ctype.encode(default_encoding) # omit in 3.x!
2014-02-25 21:18
831 查看
python27中 Lib\mimetypes.py的一个bug,属于 "def enum_types(mimedb)"函数:
File "D:\Python27\lib\mimetypes.py", line 249, in enum_types
ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 1: ordinal not in range(128)
解决方法:
删除
这几行即可
原文地址:http://www.360doc.com/content/14/0225/21/3970407_355676659.shtml
File "D:\Python27\lib\mimetypes.py", line 249, in enum_types
ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 1: ordinal not in range(128)
解决方法:
删除
try: ctype = ctype.encode(default_encoding) # omit in 3.x! except UnicodeEncodeError: pass
这几行即可
原文地址:http://www.360doc.com/content/14/0225/21/3970407_355676659.shtml
相关文章推荐
- python 科学计算学习一:numpy快速处理数据(1)
- 【PythonChallenge】Level 5
- python 信号处理句柄第二个参数的作用
- 使用ctypes调用kernel32.dll中的函数
- Python的switch实现
- python中常见的日期换算
- 解决Python提示No module named 'pkg_resources'错误
- python参考手册--第10、11章执行环境、调试
- 【Python编程】网页URL提取实例
- Python的常见几道数学运算题
- Python 处理理时间超详细转的
- Python源码剖析----第三章(下)
- storm安装(2)ZeroMQ、JZMQ、Python、Java环境的安装
- Python第三站-深入文件与异常(数据持久化)
- python文件处理:file对象,tempfile,shuitl,os.path,os
- 如何访问python类中的私有方法
- Python 之 类
- 如果有python而不能生成win独立可执行文件,则要python有什么用呢
- Python 装饰器举例
- python 使用 signal模块实现函数调用超时问题