5

I'm trying to run pip install tensorflow from a jupyter notebook (trying to run it with cmd gives out an even stranger error), and my free disk space (currently 1.2 GB left) seems to dwindle during installation and then I'm presented with [Errno 28] No space left on device. Then it goes back to what it was.

chocojunkie
  • 479
  • 2
  • 8
  • 14

3 Answers3

4

This will certainly help using pip install and build:

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

What it does is:

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.

Please Note: /data/jimit are directory so please name it according to your preferences.

Jimit Vaghela
  • 768
  • 1
  • 8
  • 31
2

Wanting to import it myself to a ML PyCharm project, I googled and run across the same issue. Using pip it will cost your disk 1.1 GB approx. So, if you have 1.2 GB size left in your disk, it makes sense that the installation stucks.

If you are familiar with the functions/classes of the tensorflow package, I'd recommend to install certain libraries. For example in an IDE - in your import section - you can use:

from tensorflow import test

That way, only test needed packages from tensorflow platform will be installed

Or using the answer from Jimit you can pip certain packages using the parameters. For further information regarding the use of pip you can also take a look here: https://pip.pypa.io/en/stable/cli/pip_install/

Efthimis_28
  • 333
  • 1
  • 6
  • 15
0

Jimit's answer didn't work for me. Instead I had to follow this example, which mentions:

 export TMPDIR='/work/tmp_other'; python3 -m pip install gooey

Which would change Jimit's answer to this:

export TMPDIR='/data/jimit/'; pip install --cache-dir=/data/jimit/ tensorflow-gpu

where /data/jimit/ is a custom directory.

gsamaras
  • 71,951
  • 46
  • 188
  • 305