python setuptools splinter安装报错UnicodeDecodeError

在Win7 x64系统上安装完毕python-2.7.6(32bit)后,通过python setup.py install 命令安装setuptools失败,

错误提示为:

........

   File "setup.py", line 6, in <module>
    from setuptools import setup, find_packages
  File "build\bdist.win32\egg\setuptools\__init__.py", line 12, in <module>
  File "build\bdist.win32\egg\setuptools\extension.py", line 7, in <module>
  File "build\bdist.win32\egg\setuptools\dist.py", line 15, in <module>
  File "build\bdist.win32\egg\setuptools\compat.py", line 19, in <module>
  File "D:\Python27\lib\SimpleHTTPServer.py", line 27, in <module>
    class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
  File "D:\Python27\lib\SimpleHTTPServer.py", line 208, in SimpleHTTPRequestHand
ler
    mimetypes.init() # try to read system mime.types
  File "D:\Python27\lib\mimetypes.py", line 358, in init
    db.read_windows_registry()
  File "D:\Python27\lib\mimetypes.py", line 258, in read_windows_registry
    for subkeyname in enum_types(hkcr):
  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 0xce in position 3: ordinal
not in range(128)


经研究发现,本机注册表中有一注册表项为中文,暂将中文修改为英文后,再次安装成功!!!

猜你喜欢

转载自blog.csdn.net/dreamslike/article/details/23873467