使用pip安装lxml会产生错误

时间:2013-11-10 16:18:05

标签: python lxml pip packages

我正在关注 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

我是新手,但从未遇到过安装任何软件包的问题。

我错过了什么吗? 提前致谢

0 个答案:

没有答案