Created
December 13, 2013 02:58
-
-
Save chappyhome/7939218 to your computer and use it in GitHub Desktop.
安装setuptools 失败
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From http://www.oschina.net/question/1409342_134600 | |
supmind | |
安装setuptools 失败 | |
supmind 发表于 2013-11-24 15:57 19天前, 5回/274阅, 最后回答: 6天前 | |
开源中国诚邀您参加 Cloud Foundry 中国群英会!(北京、上海、杭州、成都、深圳) | |
python版本2.7.6 | |
setuptools版本1.4.1 | |
错误信息 | |
01 | |
Traceback (most recent call last): | |
02 | |
File "c:\docume~1\admini~1\locals~1\temp\tmpbg7qjrpycharm-management\setuptools-1.1.5\setup.py", line 17, in <module> | |
03 | |
exec(init_file.read(), command_ns) | |
04 | |
File "<string>", line 8, in <module> | |
05 | |
File "c:\docume~1\admini~1\locals~1\temp\tmpbg7qjrpycharm-management\setuptools-1.1.5\setuptools\__init__.py", line 11, in <module> | |
06 | |
from setuptools.extension import Extension | |
07 | |
File "c:\docume~1\admini~1\locals~1\temp\tmpbg7qjrpycharm-management\setuptools-1.1.5\setuptools\extension.py", line 5, in <module> | |
08 | |
from setuptools.dist import _get_unpatched | |
09 | |
File "c:\docume~1\admini~1\locals~1\temp\tmpbg7qjrpycharm-management\setuptools-1.1.5\setuptools\dist.py", line 15, in <module> | |
10 | |
from setuptools.compat import numeric_types, basestring | |
11 | |
File "c:\docume~1\admini~1\locals~1\temp\tmpbg7qjrpycharm-management\setuptools-1.1.5\setuptools\compat.py", line 19, in <module> | |
12 | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
13 | |
File "C:\Python27\lib\SimpleHTTPServer.py", line 27, in <module> | |
14 | |
class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): | |
15 | |
File "C:\Python27\lib\SimpleHTTPServer.py", line 208, in SimpleHTTPRequestHandler | |
16 | |
mimetypes.init() # try to read system mime.types | |
17 | |
File "C:\Python27\lib\mimetypes.py", line 358, in init | |
18 | |
db.read_windows_registry() | |
19 | |
File "C:\Python27\lib\mimetypes.py", line 258, in read_windows_registry | |
20 | |
for subkeyname in enum_types(hkcr): | |
21 | |
File "C:\Python27\lib\mimetypes.py", line 249, in enum_types | |
22 | |
ctype = ctype.encode(default_encoding) # omit in 3.x! | |
23 | |
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 9: ordinal not in range(128) | |
标签: Python | |
我想问同样的问题 共0个人想要问同样的问题 补充话题说明» | |
分享到 收藏0举报踩 0 | 顶 0 | |
按评价排序 | 显示最新答案 | 回页面顶部 共有5个答案 我要回答» | |
supmindsupmind 回答于 2013-12-08 00:42 举报 | |
http://bugs.python.org/review/9291/diff/1663/Lib/mimetypes.py 这个里面有详细的解决办法,应该是python的一个bug | |
有帮助(0) | 没帮助(0) | 评论(0) | 引用此答案 | |
prehisleprehisle 回答于 2013-11-24 21:30 举报 | |
装distribute吧,参考http://jiayanjujyj.iteye.com/blog/1409819 | |
--- 共有 1 条评论 --- | |
supmind搞反了吧???Since the Setuptools 0.7 release, Setuptools and Distribute have merged and Distribute is no longer being maintained. 官网是说distribute 不在维护了..... 不过问题已经解决了 (19天前 by supmind) | |
有帮助(0) | 没帮助(0) | 评论(1) | 引用此答案 | |
太英俊太英俊 回答于 2013-11-25 13:29 举报 | |
怎么解决的!! | |
有帮助(0) | 没帮助(0) | 评论(0) | 引用此答案 | |
蔻之蔻之 回答于 2013-11-25 17:54 举报 | |
你可以注释掉 mimetypes.py中 ctype = ctype.encode(default_encoding) 那部分代码,重新执行python ez_install.py,通过 | |
--- 共有 2 条评论 --- | |
蔻之回复 @太英俊 : Python安装目录下Lib文件夹下 (10天前 by 蔻之) | |
太英俊找不到mimetypes.py文件?请问你是在哪找到的! (11天前 by 太英俊) | |
有帮助(0) | 没帮助(0) | 评论(2) | 引用此答案 | |
唯一唯一 回答于 2013-12-05 23:41 举报 | |
打开注册表,展开HKEY_CLASSES_ROOT找到中文的扩展名,删掉就好了,貌似是阿里旺旺搞的鬼 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment