Python:安装easy_install的时候报错
阿神
阿神 2017-04-17 11:59:56
[Python讨论组]

环境:win7 64位+python 2.7.6

ez_setup.py代码如下:

https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

是在官网下载的
但是,在本地运行的的时候:

python ez_setup.py
报错如下:

Now working in d:\personal\temp\tmpmsr6_i\setuptools-2.1
Installing Setuptools
Traceback (most recent call last):
  File "setup.py", line 17, in <module>
    exec(init_file.read(), command_ns)
  File "<string>", line 8, in <module>
  File "d:\personal\temp\tmpmsr6_i\setuptools-2.1\setuptools\__init__.py", line
11, in <module>
    from setuptools.extension import Extension
  File "d:\personal\temp\tmpmsr6_i\setuptools-2.1\setuptools\extension.py", line
 5, in <module>
    from setuptools.dist import _get_unpatched
  File "d:\personal\temp\tmpmsr6_i\setuptools-2.1\setuptools\dist.py", line 15,
in <module>
    from setuptools.compat import numeric_types, basestring
  File "d:\personal\temp\tmpmsr6_i\setuptools-2.1\setuptools\compat.py", line 19
, in <module>
    from SimpleHTTPServer import SimpleHTTPRequestHandler
  File "D:\Python\V2.7\lib\SimpleHTTPServer.py", line 27, in <module>
    class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
  File "D:\Python\V2.7\lib\SimpleHTTPServer.py", line 208, in SimpleHTTPRequestH
andler
    mimetypes.init() # try to read system mime.types
  File "D:\Python\V2.7\lib\mimetypes.py", line 358, in init
    db.read_windows_registry()
  File "D:\Python\V2.7\lib\mimetypes.py", line 258, in read_windows_registry
    for subkeyname in enum_types(hkcr):
  File "D:\Python\V2.7\lib\mimetypes.py", line 249, in enum_types
    ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb0 in position 1: invalid s
tart byte
Something went wrong during the installation.
See the error message above.
阿神
阿神

闭关修行中......

全部回复(1)
ringa_lee

UnicodeDecodeError: 'utf8' codec can't decode byte 0xb0 in position 1: invalid s
编码错误了,对Windows不熟,等高手回答

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号