Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在python 2.7.6上安装setuptools时出现异常_Python_Exception_Setuptools - Fatal编程技术网

在python 2.7.6上安装setuptools时出现异常

在python 2.7.6上安装setuptools时出现异常,python,exception,setuptools,Python,Exception,Setuptools,我正在Windows7 64位机器上安装setuptools for Python2.7.6,出现以下错误 C:\Python27\install_scripts>python ez_setup.py Extracting in c:\users\p\appdata\local\temp\tmpqhpyyh Now working in c:\users\p\appdata\local\temp\tmpqhpyyh\setuptools-2.1 Installing Setuptools

我正在Windows7 64位机器上安装setuptools for Python2.7.6,出现以下错误

C:\Python27\install_scripts>python ez_setup.py
Extracting in c:\users\p\appdata\local\temp\tmpqhpyyh
Now working in c:\users\p\appdata\local\temp\tmpqhpyyh\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 "c:\users\p\appdata\local\temp\tmpqhpyyh\setuptools-2.1\setuptools\__init__.py", line 11, in <module>
    from setuptools.extension import Extension
  File "c:\users\p\appdata\local\temp\tmpqhpyyh\setuptools-2.1\setuptools\extension.py", line 5, in <module>
    from setuptools.dist import _get_unpatched
  File "c:\users\p\appdata\local\temp\tmpqhpyyh\setuptools-2.1\setuptools\dist.py", line 15, in <module>
    from setuptools.compat import numeric_types, basestring
  File "c:\users\p\appdata\local\temp\tmpqhpyyh\setuptools-2.1\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 0xf4 in position 1: ordinal not in range(128)
Something went wrong during the installation.
See the error message above.
C:\Python27\install\u scripts>pythonz\u setup.py
在c:\users\p\appdata\local\temp\tmpqhpyyyh中提取
现在在c:\users\p\appdata\local\temp\tmpqhpyyyh\setuptools-2.1中工作
安装安装工具
回溯(最近一次呼叫最后一次):
文件“setup.py”,第17行,在
exec(init_file.read(),command_ns)
文件“”,第8行,在
文件“c:\users\p\appdata\local\temp\tmpqhpyyyh\setuptools-2.1\setuptools\\uuuuu init\uuuuu.py”,第11行,在
从setuptools.extension导入扩展
文件“c:\users\p\appdata\local\temp\tmpqhpyyyh\setuptools-2.1\setuptools\extension.py”,第5行,在
从setuptools.dist导入\u获取\u取消修补
文件“c:\users\p\appdata\local\temp\tmpqhpyyyh\setuptools-2.1\setuptools\dist.py”,第15行,在
从setuptools.compat导入数字类型,基串
文件“c:\users\p\appdata\local\temp\tmpqhpyyyh\setuptools-2.1\setuptools\compat.py”,第19行,在
从SimpleHTTPServer导入SimpleHTTPRequestHandler
文件“C:\Python27\lib\SimpleHTTPServer.py”,第27行,在
类SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
SimpleHTTPRequestHandler中的文件“C:\Python27\lib\SimpleHTTPServer.py”,第208行
mimetypes.init()#尝试读取系统mime.types
文件“C:\Python27\lib\mimetypes.py”,第358行,在init中
db.read\u windows\u注册表()
文件“C:\Python27\lib\mimetypes.py”,第258行,在read\u windows\u注册表中
对于枚举类型(hkcr)中的子关键字名称:
文件“C:\Python27\lib\mimetypes.py”,第249行,枚举类型
ctype=ctype.encode(默认编码)#在3.x中省略!
UnicodeDecodeError:“ascii”编解码器无法解码位置1中的字节0xf4:序号不在范围内(128)
安装过程中出现了一些问题。
请参阅上面的错误消息。

我怎样才能解决这个问题?在我安装setuptools for Python 3.4 beta之前,它安装得很好。

这就是由于Python 2.7.6的一些内部问题而出现的问题。尝试安装
2.7.5
-它应该可以正常工作。python bug tracker上针对该问题的bug报告