Unable to install torch in jupyter notebook due to error " OSError(28, 'No space left on device'))" in fedora 38

unable to install torch in jupyter notebook due to error " OSError(28, ‘No space left on device’))" in fedora 38_workstation_64

even i have enough space in my desktop.
$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 3.9G 53M 3.8G 2% /dev/shm
tmpfs 1.6G 1.8M 1.6G 1% /run
/dev/sdb6 80G 54G 24G 70% /
tmpfs 3.9G 4.3M 3.9G 1% /tmp
/dev/sdb1 1.0G 24M 888M 3% /boot/efi
/dev/sdb3 50G 15G 35G 30% /home
/dev/sdb4 86G 31G 54G 37% /var
tmpfs 782M 264K 782M 1% /run/user/1000
overlay 86G 31G 54G 37% /var/lib/waydroid/rootfs
overlay 86G 31G 54G 37% /var/lib/waydroid/rootfs/vendor

$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
devtmpfs 994989 725 994264 1% /dev
tmpfs 1000337 117 1000220 1% /dev/shm
tmpfs 819200 1501 817699 1% /run
/dev/sdb6 0 0 0 - /
tmpfs 1048576 60 1048516 1% /tmp
/dev/sdb1 0 0 0 - /boot/efi
/dev/sdb3 0 0 0 - /home
/dev/sdb4 0 0 0 - /var
tmpfs 200067 210 199857 1% /run/user/1000
overlay 0 0 0 - /var/lib/waydroid/rootfs
overlay 0 0 0 - /var/lib/waydroid/rootfs/vendor


$ sudo btrfs filesystem usage /.

Overall:
Device size: 79.27GiB
Device allocated: 57.02GiB
Device unallocated: 22.24GiB
Device missing: 0.00B
Device slack: 0.00B
Used: 53.66GiB
Free (estimated): 23.39GiB (min: 12.26GiB)
Free (statfs, df): 23.38GiB
Data ratio: 1.00
Metadata ratio: 2.00
Global reserve: 144.28MiB (used: 0.00B)
Multiple profiles: no

Data,single: Size:51.01GiB, Used:49.87GiB (97.76%)

/dev/sdb6 51.01GiB

Metadata,DUP: Size:3.00GiB, Used:1.90GiB (63.25%)

/dev/sdb6 6.00GiB

System,DUP: Size:8.00MiB, Used:16.00KiB (0.20%)

/dev/sdb6 16.00MiB

Unallocated:

/dev/sdb6 22.24GiB


In jupyter notebook:

pip install torch

Collecting torch
  Downloading torch-2.0.1-cp38-cp38-manylinux1_x86_64.whl (619.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━ 409.0/619.9 MB 5.9 MB/s eta 0:00:36
ERROR: Exception:
Traceback (most recent call last):
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher
    yield
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 561, in read
    data = self._fp_read(amt) if not fp_closed else b""
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 527, in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 94, in read
    self.__buf.write(data)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/tempfile.py", line 473, in func_wrapper
    return func(*args, **kwargs)
OSError: [Errno 28] No space left on device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 377, in run
    requirement_set = resolver.resolve(
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
    result = self._result = resolver.resolve(
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 397, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
    if not criterion.candidates:
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_vendor/resolvelib/structs.py", line 156, in __bool__
    return bool(self._sequence)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
    return any(self)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
    candidate = func()
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 293, in __init__
    super().__init__(
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
    self.dist = self._prepare()
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
    dist = self._prepare_distribution()
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 304, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 538, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 609, in _prepare_linked_requirement
    local_file = unpack_url(
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 166, in unpack_url
    file = get_http_url(
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 107, in get_http_url
    from_path, content_type = download(link, temp_dir.path)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/network/download.py", line 147, in __call__
    for chunk in chunks:
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/cli/progress_bars.py", line 53, in _rich_progress_bar
    for chunk in iterable:
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_internal/network/utils.py", line 63, in response_chunks
    for chunk in response.raw.stream(
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 622, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 587, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/kabir/.var/app/org.jupyter.JupyterLab/config/jupyterlab-desktop/jlab_server/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 455, in _error_catcher
    raise ProtocolError("Connection broken: %r" % e, e)
pip._vendor.urllib3.exceptions.ProtocolError: ("Connection broken: OSError(28, 'No space left on device')", OSError(28, 'No space left on device'))
Note: you may need to restart the kernel to use updated packages.

Are you sure you have adequate space?

Please run df -h and post that so we can see the actual space available.

i have updated

Try df -i you could be out of inodes.

btrfs gives 0 for Inodes, IUsed, and IFree. Try sudo btrfs filesystem usage /.

1 Like
[jakfrost ~]$ df -i
Filesystem      Inodes IUsed   IFree IUse% Mounted on
devtmpfs       4018967   626 4018341    1% /dev
tmpfs          4026405     1 4026404    1% /dev/shm
tmpfs           819200  1227  817973    1% /run
/dev/sda3            0     0       0     - /
tmpfs          1048576    46 1048530    1% /tmp
/dev/sdc1            0     0       0     - /home
/dev/sdb2            0     0       0     - /var
/dev/sda1            0     0       0     - /efi

There’s more, but you see my point, it does report inodes from btrfs as well

From the command you suggested …

Overall:
    Device size:		 221.98GiB
    Device allocated:		  15.02GiB
    Device unallocated:		 206.96GiB
    Device missing:		     0.00B
    Device slack:		     0.00B
    Used:			   9.68GiB
    Free (estimated):		 211.76GiB	(min: 211.76GiB)
    Free (statfs, df):		 211.75GiB
    Data ratio:			      1.00
    Metadata ratio:		      1.00
    Global reserve:		  47.61MiB	(used: 0.00B)
    Multiple profiles:		        no

Data,single: Size:14.01GiB, Used:9.21GiB (65.79%)
   /dev/sda3	  14.01GiB

Metadata,single: Size:1.01GiB, Used:472.56MiB (45.79%)
   /dev/sda3	   1.01GiB

System,single: Size:4.00MiB, Used:16.00KiB (0.39%)
   /dev/sda3	   4.00MiB

Unallocated:
   /dev/sda3	 206.96GiB

It appears this is your root file system ( / ) and it is full.

buthere gparted shows that i have 27.49GiBGiB is free in sbd6 /

Hi @ddkroyal001 ,
I see your /boot/efi mount point is listed as a btrfs files system and this appears to be the ESP which must be formatted as such, not btrfs.

is this action can corrupt the system… i mean is it risky?

Well now that you ask, since you also have a BIOS grub partition, I’m a bit concerned about why the two are there. It should be one or the other in grub land as far as booting up goes. Plus the 1.0 Mb size is too small for anything to be written. Have you upgraded hardware (such as cpu or mobo) in the interim?

no , when i was installing the fedora 38 …system told me to do so…to make 1MB partition

Possibly you have an efi system but chose the legacy bios installer. It should recommend 100Mb, not 1 Mb, for that partition in any case I think that is the norm. But to the point, if your system is newer it likely is EFI/UEFI in which case what you boot with the installer media is important. You’ll have to use your BIOS’s boot menu to make sure and select the UEFI installer of :fedora: in order to get the install going into the right (boot specific) location. This makes no difference to where :fedora: itself is installed just where the boot loader is written.

It is OK for the BIOS Boot Partition to be only 1 MB on a GPT partitioned disk, it is also unformatted. Grub then installs its BIOS bootcode there to boot an OS in compatibility mode for legacy BIOS boot on an otherwise UEFI/GPT system, presuming the UEFI supports this.

The EFI System Partition, which should be formatted with a vfat partition, is the one that needs to be at least 100 MB, and up to 1 GB if configured to boot multiple different operating systems using UEFI instead of legacy BIOS.

See this page for details.

GNU GRUB Manual 2.06: BIOS installation

If you monitor your file systems during the install you may see where the space is filled up. Two possible causes:

  • pip uses tmpfiles and your /tmp ramdisk fills up.
  • Your btrfs needs balancing so that free space can be allocated (see Jeff’s hint).