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

前端 未结 5 796
温柔的废话
温柔的废话 2021-01-01 14:48

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/         


        
相关标签:
5条回答
  • 2021-01-01 15:33

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

    0 讨论(0)
  • 2021-01-01 15:49

    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'

    0 讨论(0)
  • 2021-01-01 15:49
    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

    0 讨论(0)
  • 2021-01-01 15:49

    Solution 1: Pip won't re-download the package in this solution but in other solutions it does

    Check the available disk space using df -h:

    If you just need to change tmpfs size, you can remount it on-line with new size:

    $ sudo mount -o remount,size=10G /tmp
    $ sudo mount -o remount,size=10G /var/tmp
    

    Solution 2: You can set the environment variable 'TMPDIR' for pip

    $ export TMPDIR=$HOME/new/tmp/dir
    $ pip install --install-option="--prefix=$PYTHONUSERBASE" --upgrade $TF_BINARY_URL
    

    Solution 3: With custom cache/temp directory

    $ pip install --cache-dir=$HOME/new/tmp/dir/  --install-option="--prefix=$PYTHONUSERBASE" --upgrade $TF_BINARY_URL
    

    Solution 4: With no cache directory

    pip install --no-cache-dir --install-option="--prefix=$PYTHONUSERBASE" --upgrade $TF_BINARY_URL
    
    0 讨论(0)
  • 2021-01-01 15:50

    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".
    
    0 讨论(0)
提交回复
热议问题