Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unable to succesfully run pip install spleeter #927

Open
4 tasks
Emaan-Confinality opened this issue Jan 28, 2025 · 10 comments
Open
4 tasks

[Bug] Unable to succesfully run pip install spleeter #927

Emaan-Confinality opened this issue Jan 28, 2025 · 10 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@Emaan-Confinality
Copy link

Emaan-Confinality commented Jan 28, 2025

  • I didn't find a similar issue already open.
  • I read the documentation (README AND Wiki)
  • I have installed FFMpeg
  • My problem is related to Spleeter only, not a derivative product (such as Webapplication, or GUI provided by others)

Description

I think the new update 4 days ago related to compatible versions has caused some issue because previously the same code was working fine and giving output however now it is showing me numpy version error.

Step to reproduce

  1. Running on colab.
  2. Installed using !pip install spleeter
  3. Got error:
    "Collecting spleeter
    Using cached spleeter-2.1.0-py3-none-any.whl.metadata (10 kB)
    Collecting ffmpeg-python==0.2.0 (from spleeter)
    Using cached ffmpeg_python-0.2.0-py3-none-any.whl.metadata (1.7 kB)
    Collecting httpx<0.17.0,>=0.16.1 (from httpx[http2]<0.17.0,>=0.16.1->spleeter)
    Using cached httpx-0.16.1-py3-none-any.whl.metadata (38 kB)
    Collecting librosa==0.8.0 (from spleeter)
    Using cached librosa-0.8.0.tar.gz (183 kB)
    Preparing metadata (setup.py) ... done
    Collecting norbert==0.2.1 (from spleeter)
    Using cached norbert-0.2.1-py2.py3-none-any.whl.metadata (3.8 kB)
    Collecting numpy<1.19.0,>=1.16.0 (from spleeter)
    Using cached numpy-1.18.5.zip (5.4 MB)
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Preparing metadata (pyproject.toml) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details."

Output

previously this command would run perfectly fine and install spleeter.

Environment

OS Windows 11
Installation type pip
RAM available 12.7 GB
Hardware spec GPU / CPU both
@Emaan-Confinality Emaan-Confinality added bug Something isn't working invalid This doesn't seem right labels Jan 28, 2025
@JoseffRibble
Copy link

This is likely due to the fact that distutils has been depreciated since python3.10 and the collab is running python3.11.

@opencoca
Copy link

opencoca commented Feb 2, 2025

@Emaan-Confinality the follow is not a fix but a work around using pyenv to install and older copy of python on collab:

!git clone https://github.com/pyenv/pyenv.git ~/.pyenv
import os

# Set the root for pyenv
os.environ['PYENV_ROOT'] = os.path.expanduser("~/.pyenv")
# Prepend pyenv's bin folder to PATH
os.environ['PATH'] = os.environ['PYENV_ROOT'] + '/bin:' + os.environ['PATH']

# Confirm pyenv is callable
!pyenv --version
!apt-get install libffi-dev
!pyenv install 3.8.13
!pyenv global 3.8.13
!pyenv exec pip install spleeter
!pyenv exec spleeter

Once this is done you should be able to call spleeter as needed with !pyenv exec spleeter as it will run using python 3.8.13.

You can build with it as you want just your notebooks will always have to use !pyenv to call it as though its on the command line (you could also use a subprocess but magic is more fun)

@cacaedu
Copy link

cacaedu commented Feb 5, 2025

Hello.

Is there any way to fix this? Is it not possible to update outdated libraries?

Using old versions of Python or something similar doesn't seem like a good solution to me.

Thanks

@cacaedu
Copy link

cacaedu commented Feb 5, 2025

This is likely due to the fact that distutils has been depreciated since python3.10 and the collab is running python3.11.

Hello @JoseffRibble . It's not just with collab. It's also happening at the local installation.

@JoseffRibble
Copy link

Unfortunately, until the devs update the code, using an older python version is the only solution I have. You can use something like pyenv to create a virtual environment with an older python version. This will allow you to run the code without having to modify your system's python version

@opencoca
Copy link

opencoca commented Feb 5, 2025

Yup, The PyEnv fix works everywhere. I even use it in my more esoteric docker builds where I need choose to combine the use of different python versions.

@HaoleiH
Copy link

HaoleiH commented Feb 5, 2025

I found a way to run it on colab.
The main issue is that cloab now is using python3.11. It provide a method to allow you temporarily switch back to python3.10 though. you can try it in this official colab notebook.

Make sure the notebook is connected to google server.

tools - command palette - type "Use fallback runtime version"

This will reset the python version to be 3.10 and everything works now.

According to colab official repository, this fallback runtime feature "is available until early February"

@opencoca
Copy link

opencoca commented Feb 6, 2025

As it's it's early February I strongly recommend using my pyenv workaround.

#927 (comment)

Using pyenv this way will allow you to have multiple versions of python on the colab and won't complicate things using a fallback that's about to be retired any day now.

@Emaan-Confinality
Copy link
Author

for some reason, it is working fine on google vertex AI's colab enterprise notebook. Python version is 3.10.12.

This is likely due to the fact that distutils has been depreciated since python3.10 and the collab is running python3.11.

Hello @JoseffRibble . It's not just with collab. It's also happening at the local installation.

@opencoca
Copy link

opencoca commented Feb 6, 2025

@Emaan-Confinality, well yes that would be the reason: Python 3.10 should work with with spleeter. As @HaoleiH Google's depreciating this on the non enterprise colab this month. They'll likely keep it around for londer on enterprise.

That being said and me sounding like a broken record... just use pyenv wherever you're working with this as it's got slightly esoteric requirements and that will allow you to sidestep them causing other complications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

6 participants
@HaoleiH @opencoca @cacaedu @JoseffRibble @Emaan-Confinality and others