diracdeltas / spleeter4max

separate audio in ableton into stems using Spleeter
https://youtu.be/4pcJoI5CUOA
547 stars 51 forks source link

MacOS: spleeter command not found #49

Open LemonEar opened 4 years ago

LemonEar commented 4 years ago

I followed all the instructions for installing Spleeter native found at the page (https://github.com/diracdeltas/spleeter4max/blob/feature/native-spleeter/README.md#spleeter-for-max-native-version)

It seemed to install just fine. I put the audio that I want to split onto a track, and from my Places drag the spleeter-native.amxd onto the clip. I have tried all the usual stuff (restarting the computer, etc.) I'm not much of a coder, so this stuff is a bit beyond my ability to troubleshoot or solve on my own. Any help or solutions are greatly appreciated.

When I press Start on the device I get this: image

This is the full operation from within Max: image

Here is the full text from that last screen shot: node.script: Loaded the spleeter.js script comment: doesn't understand "bang" node.script: spleeter separate -i "/Users/monroe/Music/Ableton/Live Recordings/Temp-17 Project/Samples/Processed/Consolidate/FTG 1-30-19 [2020-08-07 164942].aif" -o "/Applications/spleeter-native" -p spleeter:4stems-16kHz js: js: no function set [main.js] node.script: Error: Command failed: spleeter separate -i "/Users/monroe/Music/Ableton/Live Recordings/Temp-17 Project/Samples/Processed/Consolidate/FTG 1-30-19 [2020-08-07 164942].aif" -o "/Applications/spleeter-native" -p spleeter:4stems-16kHz /bin/sh: spleeter: command not found node.script: Spleeter stderr: /bin/sh: spleeter: command not found node.script: Spleeter stdout: comment: doesn't understand "spleeterDone" js: js: no function set [main.js]

diracdeltas commented 4 years ago

@LemonEar the relevant line in the errror log is "spleeter: command not found". i assume you are on macos?

try opening Terminal and typing spleeter -h to verify that it's installed.

diracdeltas commented 4 years ago

also make sure you have installed python 3.7.x with the instructions at https://github.com/diracdeltas/spleeter4max/tree/feature/native-spleeter#macos-steps:

python3 --version

LemonEar commented 4 years ago

Yes, I am on MacOS. I opened Terminal and entered the command you instructed. I got this:

Earles-MacBook-Pro:~ monroe$ spleeter -h -bash: spleeter: command not found Earles-MacBook-Pro:~ monroe$

So it seems that I do not have Spleeter properly installed. Weird, I went through with everything in the instructions. I have another application on my Mac that specifically says to use Python 2.7.13. So it looks like I am going to have to install something called pyenv (outlined here: https://realpython.com/intro-to-pyenv/) which will allow me to run different versions of Python.

This is something that is way outside of my wheelhouse, so it may take me a minute to slog through everything to install pyenv. I'll check back here to give an update as to my progress. Thank you for your help!

diracdeltas commented 4 years ago

I have another application on my Mac that specifically says to use Python 2.7.13.

another way to set this up is to have python aliased to python 2.7 and python3 aliased to python 3.7. spleeter calls out to python3. good luck!

LemonEar commented 4 years ago

I decided to try to plow through and get it done yesterday, and posted here (or at least thought I had) a big update on what I ran into. I don't know why it didn't post. I'll try to duplicate it today and post here. Frustrating!

LemonEar commented 4 years ago

Ok, so I went through all of the macOS steps, starting with installing homebrew. A few error messages showed up in red, so hopefully this will give a clear sense of what the solution is.

Here is the full text of what Terminal gave me:

Last login: Wed Aug 12 12:22:15 on ttys000 Earles-MacBook-Pro:~ monroe$ [Restored Aug 13, 2020 at 10:49:29 AM] Last login: Thu Aug 13 09:45:28 on console Restored session: Wed Aug 12 13:17:48 PDT 2020 Earles-MacBook-Pro:~ monroe$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" Password: ==> This script will install: /usr/local/bin/brew /usr/local/share/doc/homebrew /usr/local/share/man/man1/brew.1 /usr/local/share/zsh/site-functions/_brew /usr/local/etc/bash_completion.d/brew /usr/local/Homebrew ==> The following existing directories will be made writable by user only: /usr/local/share/zsh /usr/local/share/zsh/site-functions

Press RETURN to continue or any other key to abort ==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/share/zsh /usr/local/share/zsh/site-functions ==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions ==> Downloading and installing Homebrew... remote: Enumerating objects: 103, done. remote: Counting objects: 100% (103/103), done. remote: Compressing objects: 100% (41/41), done. remote: Total 118 (delta 80), reused 76 (delta 62), pack-reused 15 Receiving objects: 100% (118/118), 41.29 KiB | 475.00 KiB/s, done. Resolving deltas: 100% (84/84), completed with 34 local objects. From https://github.com/Homebrew/brew

==> Homebrew has enabled anonymous aggregate formulae and cask analytics. Read the analytics documentation (and how to opt-out) here: https://docs.brew.sh/Analytics No analytics data has been sent yet (or will be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating: https://github.com/Homebrew/brew#donations

==> Next steps:

To force the link and overwrite all conflicting files: brew link --overwrite python@3.7

To list all files that would be deleted: brew link --overwrite --dry-run python@3.7 Earles-MacBook-Pro:~ monroe$ brew install ffmpeg Warning: ffmpeg 4.3.1 is already installed and up-to-date To reinstall 4.3.1, run brew reinstall ffmpeg Earles-MacBook-Pro:~ monroe$ pip3 install spleeter ERROR: Could not find a version that satisfies the requirement spleeter (from versions: none) ERROR: No matching distribution found for spleeter Earles-MacBook-Pro:~ monroe$

diracdeltas commented 4 years ago

seems like this could be the problem:

Linking /usr/local/Cellar/python@3.7/3.7.8_1...
Error: Could not symlink bin/idle3
Target /usr/local/bin/idle3
is a symlink belonging to python@3.8. You can unlink it:
brew unlink python@3.8
To force the link and overwrite all conflicting files:
brew link --overwrite python@3.7

To list all files that would be deleted:
brew link --overwrite --dry-run python@3.7

so i would first try brew unlink python@3.8 and then brew link --overwrite python@3.7

after doing this, check python3 --version in terminal. if it worked you should see 3.7.x

LemonEar commented 4 years ago

It returned this: -bash: python3: command not found

Full Terminal session follows: Last login: Thu Aug 13 10:49:29 on ttys000 Earles-MacBook-Pro:~ monroe$ brew unlink python@3.8 Unlinking /usr/local/Cellar/python@3.8/3.8.5... 24 symlinks removed Earles-MacBook-Pro:~ monroe$ brew link --overwrite python@3.7 Warning: python@3.7 is keg-only and must be linked with --force

If you need to have this software first in your PATH instead consider running: echo 'export PATH="/usr/local/opt/python@3.7/bin:$PATH"' >> /Users/monroe/.bash_profile Earles-MacBook-Pro:~ monroe$ python3 --version -bash: python3: command not found Earles-MacBook-Pro:~ monroe$

diracdeltas commented 4 years ago

try brew link --force python@3.7 again. if it's still not found then run echo 'export PATH="/usr/local/opt/python@3.7/bin:$PATH"' >> /Users/monroe/.bash_profile as suggested in the output