0

安装pytorch时出现如下错误

 pip install http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp27-none-linux_x86_64.whl 
Collecting torch==0.1.11.post5 from http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp27-none-linux_x86_64.whl
  Downloading http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp27-none-linux_x86_64.whl (475.7MB)
100% |████████████████████████████████| 475.7MB 3.5MB/s 

以下错误

Exception:
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 335, in run
    wb.build(autobuilding=True)
  File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 821, in unpack_url
    hashes=hashes
  File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 663, in unpack_http_url
    unpack_file(from_path, location, content_type, link)
  File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 599, in unpack_file
    flatten=not filename.endswith('.whl')
  File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 501, in unzip_file
    fp.write(data)
IOError: [Errno 28] No space left on device

怎么了 ?我不明白错误来自/python2.7/dist-packages/pip/

4

2 回答 2

0

遇到并解决了同样的问题,当我pip uninstall pipenv,然后没有发生错误,也许你应该卸载一些python包。

于 2018-01-12T02:07:11.860 回答
0

在我的情况下,系统/tmp空间不足,因此尽管安装路径有足够的空间仍然存在错误。

export TMPDIR=/where/you/have/enough/space/left为我解决了这个问题。

于 2021-04-13T14:54:58.597 回答