pip install 报错:No space left on device

pip install xxx的时候发生报错:

  File "/root/miniconda3/envs/new/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 622, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/root/miniconda3/envs/new/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 587, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/root/miniconda3/envs/new/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/root/miniconda3/envs/new/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 455, in _error_catcher
    raise ProtocolError("Connection broken: %r" % e, e)
pip._vendor.urllib3.exceptions.ProtocolError: ("Connection broken: OSError(28, 'No space left on device')", OSError(28, 'No space left on device'))

原因:
build目录的空间不够
解决方法:
指定一个build目录,用于存放缓存

pip install --cache-dir=/home/user/dirname xxx

猜你喜欢

转载自blog.csdn.net/weixin_43669978/article/details/132669950
今日推荐