pip: [Errno 28] No space left on device

Environment an virtual environment of python3 is created by anaconda.

  • pip version: pip 18.0
  • Python version:3.6
  • OS: linux

Description

I want to install tensorflow in my linux server, when i type

pip install   tensorflow-gpu 

the terminal shows:

  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/3f/c3/000755084b5e7b5a11df1b9166a54936075ec280b7a615cecce42973fc8b/tensorflow_gpu-1.10.1-cp36-cp36m-manylinux1_x86_64.whl (253.2MB)
    99% |############################### | 250.9MB 15.9MB/s eta 0:00:01**Could not install packages due to an EnvironmentError: [Errno 28] No space left on device**

I use df -h find that the /tmp does not have enough space .

so i change the command with --build as follows: pip install tensorflow-gpu --build /data/vincents/

However, it gaves the same error:OSError:

Collecting tensorflow-gpu
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/3f/c3/000755084b5e7b5a11df1b9166a54936075ec280b7a615cecce42973fc8b/tensorflow_gpu-1.10.1-cp36-cp36m-manylinux1_x86_64.whl (253.2MB)
    99% |############################### | 250.9MB 54.3MB/s eta 0:00:01Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

This is means the --build option in pip didn’t specify the /data/vincents/ as the unpacked path.


Edit by @pradyunsg:

Known workarounds: https://github.com/pypa/pip/issues/5816#issuecomment-425205365, https://github.com/pypa/pip/issues/5816#issuecomment-521026876 See closing comment: https://github.com/pypa/pip/issues/5816#issuecomment-587302775

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 27 (6 by maintainers)

Most upvoted comments

I think following will help:

TMPDIR=/data/vincents/ pip install --cache-dir=/data/vincents/ --build /data/vincents/ tensorflow-gpu

pip install --no-cache-dir tensorflow-gpu solved it for me.

pip downloads files to temporary directory, environment variable TMPDIR specifies that directory, also pip puts files into cache thus --cache-dir specification, --no-cache-dir should work too. --build specifies directory where wheel will be built, so its specification is also useful.

Ok, sorry for that, but it seems that my problem was a legitimate case. The problem appeared when I was installing some stuff using yaourt on Arch and I’ve set its temp directories to the path in my home dir. Despite that it seems that something related to virtualenv needed to write to the /tmp directory and I haven’t noticed that my /tmp is a tmpfs and not shared with the main partition (I only recently got back to Linux after a long break, so I didn’t even realize that it’s done in this way now). In any case, after clearing the /tmp dir it works correctly

Maybe I thought about another case, probably this one I solved just starting my script inside of the docker with fresh ubuntu.

@daa thanks !!! I can install tf with your code !! I dont know why use this “TMPDIR=/data/vincents/” ?