spleeter icon indicating copy to clipboard operation
spleeter copied to clipboard

Pin numpy version to <2.0.0 for now.

Open d-dawg78 opened this issue 2 years ago • 2 comments

Pull request title

  • [x] I read contributing guideline
  • [x] I didn't find a similar pull request already open.
  • [x] My PR is related to Spleeter only, not a derivative product (such as Webapplication, or GUI provided by others)

Description

A few sentences describing the overall goals of the pull request's commits.

How this patch was tested

You tested it, right?

  • [x] I implemented unit test whicn ran successfully using poetry run pytest tests/
  • [x] Code has been formatted using poetry run black spleeter
  • [x] Imports has been formatted using `poetry run isort spleeter``

Documentation link and external references

Please provide any info that may help us better understand your code.

d-dawg78 avatar Sep 24 '24 15:09 d-dawg78

Why?

dscottboggs avatar Mar 18 '25 10:03 dscottboggs

Why?

Spleeter is stuck in the Python 3.10 era — anything newer simply breaks. Recent NumPy versions are also moving on, leaving Python 3.10 behind. So, if you actually want Spleeter to run, you’re forced to lock NumPy to <2.0, because that’s the last version that still plays nice with Python 3.10.

Here’s the ugly but necessary workaround I use with the UV package manager:

[project]
name = "example"
version = "1.0"
description = "demo"
requires-python = "==3.10.*"
dependencies = [
    "numpy<2",
    "spleeter>=2.4.0",
    #    "tensorflow-io-gcs-filesystem==0.31.0", # needed for windows dev?
]

Be aware: pinning NumPy this low might blow up compatibility with any modern dependencies you have. But hey — welcome to the wonderful world of Python’s amazing dependency management, where pip happily lets everything burn until you fix it yourself.

UV is, at least, sane enough to handle most of these dependency dumpster fires.

LucasAlfare avatar Jul 13 '25 16:07 LucasAlfare