ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device

在linux上用pip安装东西,会报错:ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device

  1. 原因:在linux上,pip会下载到/tmp目录再进行build和安装,如果/tmp空间不足,就会看到这个报错
  2. 解决方法:
  • 法1:清理/tmp目录,留足空间
  • 法2:更改默认的下载目录,比如 export TMPDIR=/home/aaaa/tmp

参考:https://stackoverflow.com/questions/40755610/ioerror-errno-28-no-space-left-on-device-while-installing-tensorflow

你可能感兴趣的:(python,运维,linux)