Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOError: [Errno 28] No space left on device while installing TensorFlow

I am trying to install TensorFlow in my local directory using the following command.

export TF_BINARY_URL=http://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl
pip install --install-option="--prefix=$PYTHONUSERBASE" --upgrade $TF_BINARY_URL

I am getting the following error:

IOError: [Errno 28] No space left on device

Then I did df to see the following:

Filesystem             1K-blocks       Used   Available Use% Mounted on
tmpfs                      10240      10240           0 100% /tmp
tmpfs                      10240      10240           0 100% /var/tmp

Is there a way I can install TF without the temp files being downloaded in /tmp or /var/tmp? Thanks.

like image 983
Omar Shehab Avatar asked Nov 23 '16 03:11

Omar Shehab


4 Answers

Usually, You can set the environment variable 'TMPDIR' to use a different directory other than /tmp or /var/tmp and most programs will honour that.

You can perhaps try,

$ export TMPDIR=$HOME/tmp

and then start your 'pip install'

like image 66
Niranjan Nagaraju Avatar answered Oct 19 '22 07:10

Niranjan Nagaraju


You might be able to use 'pip install -b /some/other/dir' which changes the build dir.

You can also change the wheel dir as can be seen here https://pip.pypa.io/en/stable/user_guide/#installation-bundles

Running pip help install will get you the other dir options as well.

-b, --build <dir>           Directory to unpack packages into and build in.
-t, --target <dir>          Install packages into <dir>. By default this will not replace existing files/folders in <dir>. Use --upgrade to replace existing packages in <dir> with new versions.
-d, --download <dir>        Download packages into <dir> instead of installing them, regardless of what is already installed.
--src <dir>                 Directory to check out editable projects into. The default in a virtualenv is "<venv path>/src". The default for global installs is "<current dir>/src".
like image 37
Thomas Schultz Avatar answered Oct 19 '22 06:10

Thomas Schultz


Create tmp folder on /home/myuser then execute in Terminal "export TMPDIR=/home/$USER/tmp"

like image 4
Max Sandoval Avatar answered Oct 19 '22 08:10

Max Sandoval


export TMPDIR=/bigspace/space

Why?: It is likely that /tmp directory do not have enough space for some reason.

During the pip installation, pip will use /tmp directory to perform what is necessary to perform installation (e.g. download source etc).

Thus if you do not have enough space in /tmp that package installation requires then you will get disk space error.

You can configure your /tmp directory location using below command

like image 3
Sateesh Avatar answered Oct 19 '22 08:10

Sateesh