EDIT:问题通过贯通孔C解决:\ Python27 \ LIB \ mimetypes.py和添加代码缺点try块:Mimetypes.init()错误时
## Begin to line 245 :
try:
ctype = _winreg.EnumKey(mimedb, i)
except EnvironmentError:
break
try:
ctype = ctype.encode(default_encoding) # omit in 3.x!
except UnicodeEncodeError:
pass
## Here, add the universal Exception missing.
except Exception:
pass
else:
yield ctype
我从3天前开始搜索,但解决这个问题对我来说太难了。我不明白问题在哪里。
我试图通过使用GitHub,PowerShell 3等来安装我的软件包。所有这些都不起作用。除了PIP至极似乎有一个小错误...
当我试图通过使用PIP安装tweepy,这个错误追加:
Microsoft Windows [version 6.2.9200]
(c) 2012 Microsoft Corporation. Tous droits réservés.
C:\Users\user>pip install tweepy
Downloading/unpacking tweepy
Downloading tweepy-2.3.0.tar.gz
Cleaning up...
Exception:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
e=self.bundle)
File "C:\Python27\lib\site-packages\pip\req.py", line 1229, in prepare_files
req_to_install.run_egg_info()
File "C:\Python27\lib\site-packages\pip\req.py", line 292, in run_egg_info
logger.notify('Running setup.py (path:%s) egg_info for package %s' % (self.s
etup_py, self.name))
File "C:\Python27\lib\site-packages\pip\req.py", line 265, in setup_py
import setuptools
File "C:\Python27\lib\site-packages\setuptools\__init__.py", line 12, in <modu
le>
from setuptools.extension import Extension
File "C:\Python27\lib\site-packages\setuptools\extension.py", line 7, in <modu
le>
from setuptools.dist import _get_unpatched
File "C:\Python27\lib\site-packages\setuptools\dist.py", line 16, in <module>
from setuptools.depends import Require
File "C:\Python27\lib\site-packages\setuptools\depends.py", line 6, in <module
>
from setuptools import compat
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 SimpleHTTPRequestHand
ler
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 0xe9 in position 3: ordinal
not in range(128)
Storing debug log for failure in C:\Users\user\pip\pip.log
你能解释一下我请,如何repear这个?
在此先感谢, SkyzohKey。
什么是'点子--version'打印出来,又是什么'C:\用户\用户\ PIP \ pip.log'说? – thebjorn 2014-09-23 19:35:05
'pip --version'什么也没说,程序没有找到。并且日志文件在这里:http://textup.fr/105784KS – SkyzohKey 2014-09-23 20:22:48
当你调用它来安装('C:\ Users \ user> pip install tweepy')时,'pip --version'不能执行任何操作。 – thebjorn 2014-09-24 19:16:22