python 安装第三方库的时候出现 UnicodeDecodeError: 'utf8' - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wuchujie
V2EX    问与答

python 安装第三方库的时候出现 UnicodeDecodeError: 'utf8'

  •  1
     
  •   wuchujie 2014-08-24 23:32:00 +08:00 8213 次点击
    这是一个创建于 4156 天前的主题,其中的信息可能已经有所发展或是发生改变。
    新手。请指导。感激不尽。无以为报

    1. pip http://pypi.python.org/pypi/pip
    2. distribute http://pypi.python.org/pypi/distribute
    3. nose http://pypi.python.org/pypi/nose/
    4. virtualenv http://pypi.python.org/pypi/virtualenv

    安装4个包。
    期间安装了easy_install , 就是setuptools

    用下载压缩包加压 Powershell 输入 python setup.py install 这个方法安装 提示
    PS C:\Users\Jerry-Wu\pythonku\nose-1.3.3> python setup.py install
    Traceback (most recent call last):
    File "setup.py", line 27, in <module>
    from setup3lib import setup
    File "C:\Users\Jerry-Wu\pythonku\nose-1.3.3\setup3lib.py", line 2, in <module>
    from setuptools import setup as _setup
    File "C:\Python27\lib\site-packages\setuptools\__init__.py", line 2, in <module>
    from setuptools.extension import Extension, Library
    File "C:\Python27\lib\site-packages\setuptools\extension.py", line 5, in <module>
    from setuptools.dist import _get_unpatched
    File "C:\Python27\lib\site-packages\setuptools\dist.py", line 15, in <module>
    from setuptools.compat import numeric_types, basestring
    File "C:\Python27\lib\site-packages\setuptools\compat.py", line 19, in <module>
    from SimpleHTTPServer import SimpleHTTPRequestHandler
    File "C:\Python27\lib\SimpleHTTPServer.py", line 27, in <module>
    class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
    File "C:\Python27\lib\SimpleHTTPServer.py", line 208, in SimpleHTTPRequestHandler
    mimetypes.init() # try to read system mime.types
    File "C:\Python27\lib\mimetypes.py", line 358, in init
    db.read_windows_registry()
    File "C:\Python27\lib\mimetypes.py", line 258, in read_windows_registry
    for subkeyname in enum_types(hkcr):
    File "C:\Python27\lib\mimetypes.py", line 249, in enum_types
    ctype = ctype.encode(default_encoding) # omit in 3.x!
    File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
    UnicodeDecodeError: 'utf8' codec can't decode byte 0xb0 in position 1: invalid start byte
    PS C:\Users\Jerry-Wu\pythonku\nose-1.3.3>


    用easy_install nose 提示为
    PS C:\Users\Jerry-Wu\pythonku\nose-1.3.3> easy_install nose
    Traceback (most recent call last):
    File "C:\Python27\Scripts\easy_install-script.py", line 9, in <module>
    load_entry_point('setuptools==1.1', 'console_scripts', 'easy_install')()
    File "C:\Python27\lib\site-packages\pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
    File "C:\Python27\lib\site-packages\pkg_resources.py", line 2394, in load_entry_point
    return ep.load()
    File "C:\Python27\lib\site-packages\pkg_resources.py", line 2108, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
    File "C:\Python27\lib\site-packages\setuptools\__init__.py", line 2, in <module>
    from setuptools.extension import Extension, Library
    File "C:\Python27\lib\site-packages\setuptools\extension.py", line 5, in <module>
    from setuptools.dist import _get_unpatched
    File "C:\Python27\lib\site-packages\setuptools\dist.py", line 15, in <module>
    from setuptools.compat import numeric_types, basestring
    File "C:\Python27\lib\site-packages\setuptools\compat.py", line 19, in <module>
    from SimpleHTTPServer import SimpleHTTPRequestHandler
    File "C:\Python27\lib\SimpleHTTPServer.py", line 27, in <module>
    class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
    File "C:\Python27\lib\SimpleHTTPServer.py", line 208, in SimpleHTTPRequestHandler
    mimetypes.init() # try to read system mime.types
    File "C:\Python27\lib\mimetypes.py", line 358, in init
    db.read_windows_registry()
    File "C:\Python27\lib\mimetypes.py", line 258, in read_windows_registry
    for subkeyname in enum_types(hkcr):
    File "C:\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)
    目前尚无回复
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2578 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 01:56 PVG 09:56 LAX 17:56 JFK 20:56
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86