在windows 上安装python的模块有时报错:

C:Usersluohui>pip install zope.interface
Downloading/unpacking zope.interface
Cleaning up...
Exception:
Traceback (most recent call last):
File "C:Python27libsite-packagespip-1.5.6-py2.7.eggpipbasecommand.py", l
ine 122, in main
status = self.run(options, args)
File "C:Python27libsite-packagespip-1.5.6-py2.7.eggpipcommandsinstall.p
y", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
e=self.bundle)
File "C:Python27libsite-packagespip-1.5.6-py2.7.eggpipreq.py", line 1197
, in prepare_files
do_download,
File "C:Python27libsite-packagespip-1.5.6-py2.7.eggpipreq.py", line 1375
, in unpack_url
self.session,
File "C:Python27libsite-packagespip-1.5.6-py2.7.eggpipdownload.py", line
572, in unpack_http_url
download_hash = _download_url(resp, link, temp_location)
File "C:Python27libsite-packagespip-1.5.6-py2.7.eggpipdownload.py", line
433, in _download_url
for chunk in resp_read(4096):
File "C:Python27libsite-packagespip-1.5.6-py2.7.eggpipdownload.py", line
421, in resp_read
chunk_size, decode_content=False):
File "C:Python27libsite-packagespip-1.5.6-py2.7.eggpip_vendorrequestsp
ackagesurllib3response.py", line 240, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "C:Python27libsite-packagespip-1.5.6-py2.7.eggpip_vendorrequestsp
ackagesurllib3response.py", line 187, in read
data = self._fp.read(amt)
File "C:Python27libhttplib.py", line 567, in read
s = self.fp.read(amt)
File "C:Python27libsocket.py", line 380, in read
data = self._sock.recv(left)
File "C:Python27libssl.py", line 246, in recv
return self.read(buflen)
File "C:Python27libssl.py", line 165, in read
return self._sslobj.read(len)
SSLError: The read operation timed out

Storing debug log for failure in C:Usersluohuipippip.log

阅读全文

cenots linux 5.x上默认安装的python版本是2.4.3。现在很多python脚本和模块已经不支持python 2.4的版本了,想用那些模块就需要升级到python 2.6以上。但是centos linux 5.x上的很多软件如yum都是基于python 2.4开发的,把系统自带的python直接升级到python 2.6,会造成yum等这些都不能使用。所以不能这么干,得在一个操作系统上安装两个或多个python版本。

在epel的yum源上,已经有做好的python26包。先加上epel源,再直接 yum安装就行。

yum install python26 python26-devel

直接运行python26命令就是新版本的python,系统上的python命令还是2.4的版本。

阅读全文

作者的图片

阿辉

容器技术及容器集群等分布式系统研究

容器平台负责人

上海