代码之家  ›  专栏  ›  技术社区  ›  0248881

无法使用PIP升级Scipy

  •  1
  • 0248881  · 技术社区  · 8 年前

    我尝试在Ubuntu 16.04上使用PIP升级Scipy,但总是收到这个错误。我不知道发生了什么。进度达到99%,然后停止,并吐出这个错误。

    我已经尝试升级pip,但仍然出现相同的错误。

    Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
    File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 310, in run
    wb.build(autobuilding=True)
    File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 750, in build
    self.requirement_set.prepare_files(self.finder)
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 370, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 587, in _prepare_file
    session=self.session, hashes=hashes)
    File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 810, in unpack_url
    hashes=hashes
    File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 649, in unpack_http_url
    hashes)
    File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 871, in _download_http_url
    _download_url(resp, link, content_file, hashes)
    File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 595, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
    File "/usr/local/lib/python2.7/dist-packages/pip/utils/hashes.py", line 46, in check_against_chunks
    for chunk in chunks:
    File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 563, in written_chunks
    for chunk in chunks:
    File "/usr/local/lib/python2.7/dist-packages/pip/utils/ui.py", line 139, in iter
    for x in it:
    File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 552, in resp_read
    decode_content=False):
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/response.py", line 353, in stream
    data = self.read(amt=amt, decode_content=decode_content)
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/response.py", line 310, in read
    data = self._fp.read(amt)
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/filewrapper.py", line 54, in read
    self.__callback(self.__buf.getvalue())
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/controller.py", line 275, in cache_response
    self.serializer.dumps(request, response, body=body),
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/serialize.py", line 87, in dumps
    ).encode("utf8"),
    MemoryError
    
    2 回复  |  直到 8 年前
        1
  •  2
  •   user2314737    8 年前

    pip install --no-cache-dir packageName
    

    其中packageName是 scipy 在这种情况下

        2
  •  0
  •   Akshay Ram    7 年前

    最后一行显示“MemoryError” 你在使用虚拟环境吗?

    如果是这样,则环境可能需要为其分配更多内存。

    转到播放器>管理>虚拟机设置

    在这里,拖动滑块以选择要分配的较高内存值。

    重新启动虚拟环境以进行更改。

    我希望这有帮助!