nix-community / pip2nix

Freeze pip-installable packages into Nix expressions [maintainer=@datakurre]
171 stars 26 forks source link

OSError: [Errno 28] No space left on device #95

Closed Pandapip1 closed 2 weeks ago

Pandapip1 commented 5 months ago

When attempting to run pip2nix on https://github.com/ChilloutCharles/BrainflowsIntoVRChat, I get the following error:

[gavin@gavin-laptop-nixos-1:~/repos/pip2nix]$ nix-shell release.nix -A pip2nix.python39
Sourcing python-recompile-bytecode-hook.sh
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Executing setuptoolsShellHook
Obtaining file:///home/gavin/repos/pip2nix
Requirement already satisfied: setuptools in /nix/store/3mr84d7164b5ikwwcg1ainqngpq66ypx-python3.9-setuptools-47.3.1/lib/python3.9/site-packages (from pip2nix==0.9.0.dev1) (47.3.1.post20240418)
Requirement already satisfied: pip>=18 in /nix/store/y3hkqsfvf4kidvvqabr1vsl59r747hmb-python3.9-pip-20.1.1/lib/python3.9/site-packages (from pip2nix==0.9.0.dev1) (20.1.1)
Requirement already satisfied: configobj==5.0.6 in /nix/store/rxcqzzx71srp7m12rlhhs1wvvgij75jb-python3.9-configobj-5.0.6/lib/python3.9/site-packages (from pip2nix==0.9.0.dev1) (5.0.6)
Requirement already satisfied: click in /nix/store/539d834nfa42khrmv3anrzfy55r05hi6-python3.9-click-7.1.2/lib/python3.9/site-packages (from pip2nix==0.9.0.dev1) (7.1.2)
Requirement already satisfied: contexter in /nix/store/q3d21ys27dn3byyb9vsb55bcx5s68l8w-python3.9-contexter-0.1.4/lib/python3.9/site-packages (from pip2nix==0.9.0.dev1) (0.1.4)
Requirement already satisfied: jinja2 in /nix/store/w3zcxx2hhs5jhm6mr4pfpsh9rz16lg35-python3.9-jinja2-2.11.2/lib/python3.9/site-packages (from pip2nix==0.9.0.dev1) (2.11.2)
Requirement already satisfied: toml in /nix/store/bsn995nc8gnrz0aaydxkiy7h1kdf30f8-python3.9-toml-0.10.2/lib/python3.9/site-packages (from pip2nix==0.9.0.dev1) (0.10.2)
Requirement already satisfied: six in /nix/store/hzzd5nzmyj5d7q230ayxmps2l8yhh84j-python3.9-six-1.15.0/lib/python3.9/site-packages (from configobj==5.0.6->pip2nix==0.9.0.dev1) (1.15.0)
Requirement already satisfied: MarkupSafe>=0.23 in /nix/store/sgwy8ljddbilwhpdsj3jdfrx43sxq6ba-python3.9-MarkupSafe-1.1.1/lib/python3.9/site-packages (from jinja2->pip2nix==0.9.0.dev1) (1.1.1)
Installing collected packages: pip2nix
  Running setup.py develop for pip2nix
Successfully installed pip2nix
WARNING: You are using pip version 20.1.1; however, version 24.0 is available.
You should consider upgrading via the '/nix/store/h4hixxmfbsccyvwnnlgjc2sfcns0hfms-python3-3.9.0/bin/python3.9 -m pip install --upgrade pip' command.
Finished executing setuptoolsShellHook

[nix-shell:~/repos/pip2nix]$ cd ../BrainFlowsIntoVRChat/

[nix-shell:~/repos/BrainFlowsIntoVRChat]$ pip2nix generate -r requirements.txt
Collecting brainflow>=5.12.0
  Using cached brainflow-5.12.1-py3-none-any.whl (28.7 MB)
Collecting numpy>=1.24.3
  Using cached numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Collecting python_osc>=1.8.3
  Using cached python_osc-1.8.3-py3-none-any.whl (33 kB)
Collecting scipy>=1.8.0
  Using cached scipy-1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (38.6 MB)
Collecting setuptools>=68.0.0
  Using cached setuptools-69.5.1-py3-none-any.whl (894 kB)
Collecting matplotlib>=3.8.2
  Using cached matplotlib-3.8.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)
Collecting Pillow>=10.2.0
  Using cached pillow-10.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB)
Collecting scikit_learn>=1.4.0
  Using cached scikit_learn-1.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting tensorflow>=2.16.0rc0
  Using cached tensorflow-2.16.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (589.8 MB)
ERROR: Exception:
Traceback (most recent call last):
  File "/home/gavin/repos/pip2nix/pip2nix/generate.py", line 321, in super_run
    resolver.resolve(requirement_set)
TypeError: resolve() missing 1 required positional argument: 'check_supported_wheels'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/y3hkqsfvf4kidvvqabr1vsl59r747hmb-python3.9-pip-20.1.1/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 188, in _main
    status = self.run(options, args)
  File "/home/gavin/repos/pip2nix/pip2nix/generate.py", line 347, in run
    return requirement_set
  File "/nix/store/q3d21ys27dn3byyb9vsb55bcx5s68l8w-python3.9-contexter-0.1.4/lib/python3.9/site-packages/contexter.py", line 96, in __exit__
    reraise(exc)
  File "/nix/store/q3d21ys27dn3byyb9vsb55bcx5s68l8w-python3.9-contexter-0.1.4/lib/python3.9/site-packages/contexter.py", line 26, in reraise
    raise exc[1].with_traceback(exc[2])
  File "/home/gavin/repos/pip2nix/pip2nix/generate.py", line 346, in run
    requirement_set = self.super_run(options, args)
  File "/home/gavin/repos/pip2nix/pip2nix/generate.py", line 323, in super_run
    requirement_set = resolver.resolve(requirement_set, check_supported_wheels=True)
  File "/nix/store/y3hkqsfvf4kidvvqabr1vsl59r747hmb-python3.9-pip-20.1.1/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 179, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/nix/store/y3hkqsfvf4kidvvqabr1vsl59r747hmb-python3.9-pip-20.1.1/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 362, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/nix/store/y3hkqsfvf4kidvvqabr1vsl59r747hmb-python3.9-pip-20.1.1/lib/python3.9/site-packages/pip/_internal/resolution/legacy/resolver.py", line 314, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/nix/store/y3hkqsfvf4kidvvqabr1vsl59r747hmb-python3.9-pip-20.1.1/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 467, in prepare_linked_requirement
    local_file = unpack_url(
  File "/nix/store/y3hkqsfvf4kidvvqabr1vsl59r747hmb-python3.9-pip-20.1.1/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 264, in unpack_url
    unpack_file(file.path, location, file.content_type)
  File "/nix/store/y3hkqsfvf4kidvvqabr1vsl59r747hmb-python3.9-pip-20.1.1/lib/python3.9/site-packages/pip/_internal/utils/unpacking.py", line 249, in unpack_file
    unzip_file(
  File "/nix/store/y3hkqsfvf4kidvvqabr1vsl59r747hmb-python3.9-pip-20.1.1/lib/python3.9/site-packages/pip/_internal/utils/unpacking.py", line 139, in unzip_file
    shutil.copyfileobj(fp, destfp)
  File "/nix/store/h4hixxmfbsccyvwnnlgjc2sfcns0hfms-python3-3.9.0/lib/python3.9/shutil.py", line 205, in copyfileobj
    fdst_write(buf)
OSError: [Errno 28] No space left on device
WARNING: You are using pip version 20.1.1; however, version 24.0 is available.
You should consider upgrading via the '/nix/store/h4hixxmfbsccyvwnnlgjc2sfcns0hfms-python3-3.9.0/bin/python3.9 -m pip install --upgrade pip' command.

This is odd because I have over 400Gb left of free space on my SSD.

turbotimon commented 2 weeks ago

Maybe not on your partition where the nix store is? You could try to run the garbage collector with nix-store --gc and try again. Or see what's left there with df -h /nix/store/

Pandapip1 commented 2 weeks ago

I only have a /boot and a / partition. Regardless, I can't even get pip2nix to start up any more:

❯ nix-shell release.nix -A pip2nix.python39
error:
       … while evaluating the attribute 'python39'
         at /home/gavin/repos/pip2nix/release.nix:12:5:
           11|     name = "python${pythonVersion}";
           12|     value = import ./default.nix {
             |     ^
           13|       inherit pkgs;

       … in the left operand of the update (//) operator
         at /nix/store/hz10q1pjkk74bvqn29y5si3na0ia13jz-nixpkgs-unstable-src/lib/fixed-points.nix:252:12:
          251|       in
          252|       prev // overlay final prev
             |            ^
          253|     );

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: function 'anonymous lambda' called with unexpected argument 'self'
       at /nix/store/hz10q1pjkk74bvqn29y5si3na0ia13jz-nixpkgs-unstable-src/pkgs/development/interpreters/python/passthrufun.nix:37:6:
           36|     # - applies overrides from `packageOverrides` and `pythonPackagesOverlays`.
           37|     ({ pkgs, stdenv, python, overrides }: let
             |      ^
           38|       pythonPackagesFun = import ./python-packages-base.nix {

EDIT: I'm stupid; the working tree wasn't clean. For some reason, it's succeeding now, so I'll close this issue.