I am using Fedora 23 VPS. When I try to install the torch python module; I get this error:

[root@vps47654603 ~]# python3.8 -m pip install torch torchvision
Collecting torch
  Downloading torch-1.6.0-cp38-cp38-manylinux1_x86_64.whl (748.8 MB)
     |███████████████████████         | 536.9 MB 493 kB/s eta 0:07:10ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

These are the partitions on my VPS list by fdisk:

[root@vps47654603 ~]# fdisk -l
Disk /dev/ploop10416: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disklabel type: gpt
Disk identifier: E8B04200-4858-459C-8ABA-07728770785A

Device            Start      End  Sectors Size Type
/dev/ploop10416p1  2048 41940992 41938945  20G Linux filesystem

These are the partitions on my VPS list by df:

[root@vps47654603 ~]# df -h
Filesystem         Size  Used Avail Use% Mounted on
/dev/ploop10416p1   20G  2.3G   17G  12% /
none               512M     0  512M   0% /sys/fs/cgroup
none               512M     0  512M   0% /dev
tmpfs              512M     0  512M   0% /dev/shm
tmpfs              512M  160K  512M   1% /run
tmpfs              512M     0  512M   0% /tmp
tmpfs              103M     0  103M   0% /run/user/0

The inodes are:

[root@vps47654603 ~]# df -i
Filesystem         Inodes IUsed   IFree IUse% Mounted on
/dev/ploop10416p1 1310720 84992 1225728    7% /
none               131072    16  131056    1% /sys/fs/cgroup
none               131072    77  130995    1% /dev
tmpfs              131072     1  131071    1% /dev/shm
tmpfs              131072   129  130943    1% /run
tmpfs              131072     8  131064    1% /tmp
tmpfs              131072     4  131068    1% /run/user/0

My questions are:

  • Why do I get this error?
  • What should I do to extend the current partition to max 20Gb as provided by my VPS provider?
  • What are all those other tmpfs partitions listed by df?
  • 8
    Not strictly related to your question, but Fedora 23 is EOL since 2016. Sep 21 '20 at 12:25
  • Yes, I told my VPS provider regarding this and also asked them to provide Fedora 30 or above but they replied that "Fedora 30 and above OS contain bugs." Sep 21 '20 at 14:23
  • 15
    You need a new VPS provider. One with competent staff. Every OS contains bugs so that is a ridiculous excuse. You should also try to avoid OpenVZ but that's for different reasons. It's not particularly reliable. Sep 21 '20 at 14:46
  • 7
    I don't care how many bugs they think F30 has, by this point I can all but guarantee that F23 has more of them. I concur with @MichaelHampton -- get a new VPS provider, now.
    – Shadur
    Sep 22 '20 at 6:56
  • Thanks, @Shadur, now I always ask the VPS providers for the latest version of my favourite Server OS: Fedora, whenever I sign up for their services. Usually, VPS providers only provide Fedora 21, 23 or 27. Dec 5 '20 at 10:46

If I'm not mistaken the pytorch module is 750 MB large, the tmp partition has only 500 MB of free space. That seems to be the issue. You can temporary point the tmp directory to a different path and the installation should work:

mkdir /tmp2
export TMPDIR=/tmp2
python3.8 -m pip install --no-clean --no-cache-dir torch torchvision
  • Your solution is successfully downloading the torch. But a very long error stack is printed and at last there is written "memory error". Sep 21 '20 at 13:03
  • That sucks. I don't think the error you are hitting now is related to a disk space problem. You could try to set --build parameter as well as suggested by @sanjayparmar. Most likely you will need to investigate the error message further. Sep 21 '20 at 13:07
  • Yes, I also tried @sanayparmar's answer, but it says that --build is decrecated. Then it downloads torch with the same error. Where can I get documentation regarding --build? Sep 21 '20 at 13:10
  • The error message in your question was related to missing disk space. The problem you are now having is likely unrelated. So normal debugging steps apply: google the error message. With the information provided it is not possible to help you any further. Sep 21 '20 at 13:19
  • 3
    Hello there, After reading discuss.pytorch.org/t/memory-error-when-installing-pytorch/8027 and github.com/pypa/pip/issues/8333 forums I found solution to my problem. I have updated your solution. Sep 21 '20 at 14:59

/tmp directory does not have enough space as package size around 700MB

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.

try below code


python3.8 -m pip install --no-clean --no-cache-dir torch torchvision

  • Hello there, I tried your approach but it shows that option --build is deprecated and on top of that it is also not mentioned in python3.8 -m pip install --help. Where can I get more info regarding --build? Sep 21 '20 at 14:28
  • I got my answer after reading the forum: github.com/pypa/pip/issues/8333 that option --build is a hidden feature. Sep 23 '20 at 6:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.