windows python2.7 执行 pip -h 然后报错如何,怎么破?
$ pip -h
Traceback (most recent call last ):
File "d:\python2\Scripts\
pip-script.py", line 9, in <module>
load_entry_point ('pip==7.1.2', 'console_scripts', 'pip')()
File "d:\python2\lib\site-packages\distribute-0.6.49-py2.7.egg\pkg_resources.p
y", line 345, in load_entry_point
return get_distribution (dist ).load_entry_point (group, name )
File "d:\python2\lib\site-packages\distribute-0.6.49-py2.7.egg\pkg_resources.p
y", line 2381, in load_entry_point
return ep.load ()
File "d:\python2\lib\site-packages\distribute-0.6.49-py2.7.egg\pkg_resources.p
y", line 2087, in load
entry = __import__(self.module_name, globals (),globals (), ['__name__'])
File "d:\python2\lib\site-packages\pip-7.1.2-py2.7.egg\pip\
__init__.py", line
15, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "d:\python2\lib\site-packages\pip-7.1.2-py2.7.egg\pip\vcs\
mercurial.py",
line 10, in <module>
from pip.download import path_to_url
File "d:\python2\lib\site-packages\pip-7.1.2-py2.7.egg\pip\
download.py", line
38, in <module>
from pip._vendor import requests, six
File "d:\python2\lib\site-packages\pip-7.1.2-py2.7.egg\pip\_vendor\requests\__
init__.py", line 53, in <module>
from .packages.urllib3.contrib import pyopenssl
File "d:\python2\lib\site-packages\pip-7.1.2-py2.7.egg\pip\_vendor\requests\pa
ckages\
__init__.py", line 3, in <module>
from . import urllib3
File "d:\python2\lib\site-packages\pip-7.1.2-py2.7.egg\pip\_vendor\requests\pa
ckages\urllib3\
__init__.py", line 10, in <module>
from .connectionpool import (
File "d:\python2\lib\site-packages\pip-7.1.2-py2.7.egg\pip\_vendor\requests\pa
ckages\urllib3\
connectionpool.py", line 31, in <module>
from .connection import (
File "d:\python2\lib\site-packages\pip-7.1.2-py2.7.egg\pip\_vendor\requests\pa
ckages\urllib3\
connection.py", line 9, in <module>
from http.client import HTTPConnection as _HTTPConnection, HTTPException
File "d:\python2\
http.py", line 2, in <module>
from CGIHTTPServer import CGIHTTPRequestHandler
File "d:\python2\lib\
CGIHTTPServer.py", line 30, in <module>
import SimpleHTTPServer
File "d:\python2\lib\
SimpleHTTPServer.py", line 27, in <module>
class SimpleHTTPRequestHandler (BaseHTTPServer.BaseHTTPRequestHandler ):
File "d:\python2\lib\
SimpleHTTPServer.py", line 208, in SimpleHTTPRequestHandl
er
mimetypes.init () # try to read system mime.types
File "d:\python2\lib\
mimetypes.py", line 368, in init
db.read_windows_registry ()
File "d:\python2\lib\
mimetypes.py", line 268, in read_windows_registry
for subkeyname in enum_types (hkcr ):
File "d:\python2\lib\
mimetypes.py", line 257, in enum_types
ctype = ctype.encode (default_encoding ) # omit in 3.x!
UnicodeDecodeError: 'utf8' codec can't decode byte 0xcc in position 0: invalid c
ontinuation byte
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.