Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 17427  / 2 Years ago, wed, february 2, 2022, 1:41:34

When I try to install the pytorch module for python3.8 pip complains that there is no space left on the device e.g.


$ pip3 install torch
Collecting torch
Using cached torch-1.8.1-cp38-cp38-manylinux1_x86_64.whl (804.1 MB)
ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

But according to df there should be enough space around both on the system partition as well as in tmpfs.


Output from df:


$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.7G 0 7.7G 0% /dev
tmpfs 1.6G 20M 1.6G 2% /run
/dev/nvme0n1p4 23G 20G 2.3G 90% /
tmpfs 7.7G 127M 7.6G 2% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup
/dev/nvme0n1p5 183G 48G 126G 28% /home
/dev/nvme0n1p1 256M 37M 220M 15% /boot/efi
tmpfs 1.6G 5.8M 1.6G 1% /run/user/1000

I did try to use a different TMP_DIR as suggested by some StackOverflow answers like this one but that did not fix the problem in my case. My system drive seems to be a bit full but it looks like there should be enough space to install the package. I also tried to install the package locally (e.g. pip3 install --user) but that did not help either.


Pip worked for all the other packages I tried to install but for this one. Though the other packages were notably smaller.


Ubuntu version: 20.04.1 LTS


Pip version: 20.0.2 for python 3.8


More From » python

 Answers
2

The most likely cause is lack of space in /tmp. The workaround is to instruct pip to use an alternative folder. I use the following formulation:


TMPDIR=/home/user/tmp/ python3 -m pip install a_package


I tried using the cache-dir argument but it fails with a "file not found" error.


[#1774] Thursday, February 3, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
whipstder

Total Points: 189
Total Questions: 110
Total Answers: 99

Location: Uzbekistan
Member since Sat, Feb 27, 2021
3 Years ago
whipstder questions
Wed, Nov 9, 22, 09:45, 2 Years ago
Tue, Sep 14, 21, 10:54, 3 Years ago
Sun, May 28, 23, 03:52, 1 Year ago
Sat, Jul 17, 21, 07:10, 3 Years ago
Thu, Sep 2, 21, 07:15, 3 Years ago
;