spleeter icon indicating copy to clipboard operation
spleeter copied to clipboard

Spleeter(2.4.0) is not compatible with latest Flask version(2.2.2)

Open suraj143rosy opened this issue 2 years ago • 4 comments

Flask ==2.2.2 Spleeter == 2.4.0 Python >=3.7.3

I have tried using spleeter in a Flask service using the latest version of Flask. Unfortunately when i Import spleeter I am getting the below error. Upon resolving this error by installing the required version of click, i see that Flask is not running. How can we make spleeter to work with the latest version of Flask?

Error: from spleeter.separator import Separator 2023-07-27 11:43:14.011931: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory 2023-07-27 11:43:14.011974: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. /home/vtp-vm-user/.local/lib/python3.7/site-packages/requests/init.py:104: RequestsDependencyWarning: urllib3 (1.26.15) or chardet (5.1.0)/charset_normalizer (2.0.12) doesn't match a supported version! RequestsDependencyWarning) Traceback (most recent call last): File "", line 1, in File "/home/vtp-vm-user/.local/lib/python3.7/site-packages/spleeter/separator.py", line 30, in from .audio.adapter import AudioAdapter File "/home/vtp-vm-user/.local/lib/python3.7/site-packages/spleeter/audio/adapter.py", line 20, in from ..utils.logging import logger File "/home/vtp-vm-user/.local/lib/python3.7/site-packages/spleeter/utils/logging.py", line 12, in from typer import echo File "/home/vtp-vm-user/.local/lib/python3.7/site-packages/typer/init.py", line 12, in from click.termui import get_terminal_size as get_terminal_size ImportError: cannot import name 'get_terminal_size' from 'click.termui' (/home/vtp-vm-user/.local/lib/python3.7/site-packages/click/termui.py)

suraj143rosy avatar Jul 27 '23 11:07 suraj143rosy

I also encountered the same problem

372362092 avatar Sep 04 '24 03:09 372362092

I also encountered the same problem

Me, too. You got it?

1731249586 avatar Sep 04 '24 11:09 1731249586

i had this and got it working. not with the latest version of spleeter or flask.. it seems the probleem is deeply rooted. also i had to downgrade python. i got it working on python 3.8 on a virtual env (install with deadsnakes):

steps:

  1. install python 3.8 in parallel to your existing python:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.8 python3.8-venv python3.8-distutils

  1. create virtual environment

python3.8 -m venv myenv


source myenv/bin/activate

3)install deps

pip install spleeter Flask==3.0.3 tensorflow-cpu protobuf==3.19.6 tensorflow numpy click==8.1.7 werkzeug

it will take ages (more than 2 hours) and it downloads lots of packages but in the end it works

loscrossos avatar Sep 05 '24 20:09 loscrossos

any way how to get it working with specific versions of tensorflow-cpu or tensorflow? I am having the same problem, but the download time and space it occupies is not very efficient.

pr-data-port avatar Feb 07 '25 12:02 pr-data-port