在linux上用pip安装东西,会报错:ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device。
或者
原因:在linux上,pip会下载到/tmp目录再进行build和安装,如果/tmp空间不足,就会看到这个报错
解决方法:
法1:清理/tmp目录,留足空间
法2:更改默认的下载目录,比如 export TMPDIR=/home/aaaa/tmp
使用下面命令有效解决:
TMPDIR=/data/tensorflow/ pip3 --cache-dir /data/tensorflow/ install tensorflow tensorflow_probability
参考:ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device-优快云博客