无法在RedHat上安装python3的setuptools

时间:2014-12-23 02:36:21

标签: python python-3.x pip

我的系统是RedHat 7.0 + python3.4

没有安装yum的软件包。

所以我用

python3 ez_setup.py 

安装Setuptools。

但是出现了一些错误

Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-8.2.1.zip
Extracting in /tmp/tmpzu9sj75k
Traceback (most recent call last):
File "ez_setup.py", line 332, in <module>
sys.exit(main())
File "ez_setup.py", line 329, in main
return _install(archive, _build_install_args(options))
File "ez_setup.py", line 51, in _install
with archive_context(archive_filename):
File "/usr/local/lib/python3.4/contextlib.py", line 59, in __enter__
return next(self.gen)
File "ez_setup.py", line 101, in archive_context
archive.extractall()
File "/usr/local/lib/python3.4/zipfile.py", line 1240, in extractall
self.extract(zipinfo, path, pwd)
File "/usr/local/lib/python3.4/zipfile.py", line 1228, in extract
return self._extract_member(member, path, pwd)
File "/usr/local/lib/python3.4/zipfile.py", line 1290, in _extract_member
with self.open(member, pwd=pwd) as source, \
File "/usr/local/lib/python3.4/zipfile.py", line 1210, in open
close_fileobj=not self._filePassed)
File "/usr/local/lib/python3.4/zipfile.py", line 651, in __init__
self._decompressor = _get_decompressor(self._compress_type)
File "/usr/local/lib/python3.4/zipfile.py", line 614, in _get_decompressor
return zlib.decompressobj(-15)
AttributeError: 'NoneType' object has no attribute 'decompressobj'

为什么这么难安装pip3 .... 谁能帮我?谢谢!

1 个答案:

答案 0 :(得分:1)