Linaqruf / kohya-trainer

Adapted from https://note.com/kohya_ss/n/nbf7ce8d80f29 for easier cloning
Apache License 2.0
1.84k stars 302 forks source link

Error in Install Dependencies cell (FileNotFoundError) #216

Open ReEnMikki opened 1 year ago

ReEnMikki commented 1 year ago

image

Cloning into '/content/kohya-trainer'...
remote: Enumerating objects: 2043, done.
remote: Counting objects: 100% (709/709), done.
remote: Compressing objects: 100% (211/211), done.
remote: Total 2043 (delta 557), reused 556 (delta 498), pack-reused 1334
Receiving objects: 100% (2043/2043), 3.80 MiB | 17.75 MiB/s, done.
Resolving deltas: 100% (1314/1314), done.
25 packages can be upgraded. Run 'apt list --upgradable' to see them.
The following NEW packages will be installed:
  libunwind-dev
0 upgraded, 1 newly installed, 0 to remove and 25 not upgraded.
Need to get 472 kB of archives.
After this operation, 4,164 kB of additional disk space will be used.
Selecting previously unselected package libunwind-dev:amd64.
(Reading database ... 122519 files and directories currently installed.)
Preparing to unpack .../libunwind-dev_1.2.1-9ubuntu0.1_amd64.deb ...
Unpacking libunwind-dev:amd64 (1.2.1-9ubuntu0.1) ...
Setting up libunwind-dev:amd64 (1.2.1-9ubuntu0.1) ...
Processing triggers for man-db (2.9.1-1) ...
deb-libs.zip        100%[===================>]   2.23M  --.-KB/s    in 0.02s   
Selecting previously unselected package aria2.
(Reading database ... 122572 files and directories currently installed.)
Preparing to unpack .../aria2_1.35.0-1build1_amd64.deb ...
Unpacking aria2 (1.35.0-1build1) ...
dpkg: warning: downgrading google-perftools from 2.7-1ubuntu2 to 2.5-2.2ubuntu3
Preparing to unpack .../google-perftools_2.5-2.2ubuntu3_all.deb ...
Unpacking google-perftools (2.5-2.2ubuntu3) over (2.7-1ubuntu2) ...
Selecting previously unselected package libaria2-0:amd64.
Preparing to unpack .../libaria2-0_1.35.0-1build1_amd64.deb ...
Unpacking libaria2-0:amd64 (1.35.0-1build1) ...
Selecting previously unselected package libc-ares2:amd64.
Preparing to unpack .../libc-ares2_1.15.0-1ubuntu0.1_amd64.deb ...
Unpacking libc-ares2:amd64 (1.15.0-1ubuntu0.1) ...
dpkg: warning: downgrading libgoogle-perftools4:amd64 from 2.7-1ubuntu2 to 2.5-2.2ubuntu3
Preparing to unpack .../libgoogle-perftools4_2.5-2.2ubuntu3_amd64.deb ...
Unpacking libgoogle-perftools4 (2.5-2.2ubuntu3) over (2.7-1ubuntu2) ...
Selecting previously unselected package libgoogle-perftools-dev.
Preparing to unpack .../libgoogle-perftools-dev_2.5-2.2ubuntu3_amd64.deb ...
Unpacking libgoogle-perftools-dev (2.5-2.2ubuntu3) ...
Selecting previously unselected package liblz4-tool.
Preparing to unpack .../liblz4-tool_1.9.2-2ubuntu0.20.04.1_all.deb ...
Unpacking liblz4-tool (1.9.2-2ubuntu0.20.04.1) ...
dpkg: warning: downgrading libtcmalloc-minimal4:amd64 from 2.7-1ubuntu2 to 2.5-2.2ubuntu3
Preparing to unpack .../libtcmalloc-minimal4_2.5-2.2ubuntu3_amd64.deb ...
Unpacking libtcmalloc-minimal4 (2.5-2.2ubuntu3) over (2.7-1ubuntu2) ...
Selecting previously unselected package lz4.
Preparing to unpack .../lz4_1.9.2-2ubuntu0.20.04.1_amd64.deb ...
Unpacking lz4 (1.9.2-2ubuntu0.20.04.1) ...
Setting up libc-ares2:amd64 (1.15.0-1ubuntu0.1) ...
Setting up libtcmalloc-minimal4 (2.5-2.2ubuntu3) ...
Setting up lz4 (1.9.2-2ubuntu0.20.04.1) ...
Setting up libaria2-0:amd64 (1.35.0-1build1) ...
Setting up libgoogle-perftools4 (2.5-2.2ubuntu3) ...
Setting up libgoogle-perftools-dev (2.5-2.2ubuntu3) ...
Setting up liblz4-tool (1.9.2-2ubuntu0.20.04.1) ...
Setting up aria2 (1.35.0-1build1) ...
Setting up google-perftools (2.5-2.2ubuntu3) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
  Preparing metadata (setup.py) ... done
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 191.5/191.5 kB 15.2 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 103.6 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.1/53.1 kB 6.6 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.5/123.5 kB 16.5 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.8/61.8 MB 13.5 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.6/41.6 kB 5.0 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 503.1/503.1 kB 49.4 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 825.8/825.8 kB 52.2 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.5/62.5 MB 12.5 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.6/5.6 MB 73.5 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 69.1 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 8.4 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 549.1/549.1 kB 55.6 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 266.3/266.3 kB 32.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 200.1/200.1 kB 25.0 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 599.8/599.8 kB 54.3 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  Preparing metadata (setup.py) ... done
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.8/7.8 MB 83.4 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 519.2/519.2 kB 42.4 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.5/62.5 kB 8.7 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 43.1/43.1 kB 5.7 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.0/247.0 kB 25.8 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 81.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.7/57.7 kB 8.2 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 77.6 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.0/115.0 kB 16.9 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.0/247.0 kB 32.0 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 268.8/268.8 kB 32.4 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 149.6/149.6 kB 14.6 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 114.5/114.5 kB 7.6 MB/s eta 0:00:00
  Building wheel for fairscale (pyproject.toml) ... done
  Building wheel for dadaptation (pyproject.toml) ... done
  Building wheel for lycoris-lora (setup.py) ... done
  Building wheel for library (setup.py) ... done
  Building wheel for elfinder-client (setup.py) ... done
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.8/123.8 MB 9.4 MB/s eta 0:00:00

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in <cell line: 170>:170                                                                          │
│ in main:159                                                                                      │
│ in remove_bitsandbytes_message:116                                                               │
│ in read_file:51                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [Errno 2] No such file or directory: 
'/usr/local/lib/python3.9/dist-packages/bitsandbytes/cuda_setup/main.py'
Linaqruf commented 1 year ago

Thank you for reporting this

Colab recently updating it's python to 3.10 so any path using python3.9 won't work anymore, pushed the fix a minute ago https://github.com/Linaqruf/kohya-trainer/commit/dc978c4c167ff905e5e29476f4f62b5af2b67199 image

deszeroNEXT commented 1 year ago

Simply change that 3.9 to 3.10. Works for me. Not sure about its compatibility with xformer0.0.18 though.