IOError:[Errno 28]安装pytorch时设备上没有剩余空间

4xrmg8kj  于 2023-10-20  发布在  其他
关注(0)|答案(3)|浏览(129)

安装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/

vsikbqxv

vsikbqxv1#

在我的情况下,系统/tmp用完了空间,因此尽管安装路径有足够的空间,但仍然存在错误。
export TMPDIR=/where/you/have/enough/space/left为我解决了这个问题。

uelo1irk

uelo1irk2#

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

y3bcpkx1

y3bcpkx13#

for me@user495285 answer made the trick(export TMPDIR=/where/you/have/enough/space/left)请注意,我跟踪了该特定位置上使用的pytorch安装空间,在高峰期,它需要7.1GB在2023年9月安装以下dist包:

  • cmake-3.27.2 filelock-3.12.3 lit-16.0.6 mpmath-1.3.0 networkx-3.1 nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-cupti-cu11-11.7.101 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11 - 11.7.99 nvidia-cudnn-cu11-8.5.0.96 nvidia-cufft-cu11-10.9.0.58 nvidia-cusolver-cu11-11.4.0.1 nvidia-cusparse-cu11-11.7.4.91 nvidia-nccl-cu11-2.14.3 nvidia-nvtx-cu11-11.7.91 sympy-1.12 torch-2.0.1 triton-2.0.0 typing-extensions-4.7.1* nvidia-curand-cu11-10.2.10.91

相关问题