我正在关注BeautifulSoup的教程,我需要使用 lxml 包
但是当我尝试使用 pip 安装lxml时,它总是在最后产生错误,因此不会安装lxml 。
这就是我所做的:
pip install lxml
但这就是我得到的:
PS C:\Users\foo> pip install lxml
Downloading/unpacking lxml
Real name of requirement lxml is lxml
Downloading lxml-3.2.4.tar.gz (3.3Mb): 3.1Mb downloaded
Exception:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip\basecommand.py", line 126, in main
self.run(options, args)
File "C:\Python27\lib\site-packages\pip\commands\install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.b
File "C:\Python27\lib\site-packages\pip\req.py", line 961, in prepare_files
self.unpack_url(url, location, self.is_download)
File "C:\Python27\lib\site-packages\pip\req.py", line 1079, in unpack_url
return unpack_http_url(link, location, self.download_cache, only_download)
File "C:\Python27\lib\site-packages\pip\download.py", line 449, in unpack_http_url
download_hash = _download_url(resp, link, temp_location)
File "C:\Python27\lib\site-packages\pip\download.py", line 367, in _download_url
chunk = resp.read(4096)
File "C:\Python27\lib\socket.py", line 380, in read
data = self._sock.recv(left)
File "C:\Python27\lib\httplib.py", line 561, in read
s = self.fp.read(amt)
File "C:\Python27\lib\socket.py", line 380, in read
data = self._sock.recv(left)
File "C:\Python27\lib\ssl.py", line 232, in recv
return self.read(buflen)
File "C:\Python27\lib\ssl.py", line 151, in read
return self._sslobj.read(len)
SSLError: The read operation timed out
我是新手,但安装任何软件包都没有问题。
请问我有什么遗漏吗?提前致谢