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

relax resampy version requirement to support python3.12 #103

Merged
merged 1 commit into from
Aug 19, 2024
Merged

relax resampy version requirement to support python3.12 #103

merged 1 commit into from
Aug 19, 2024

Conversation

tandav
Copy link
Contributor

@tandav tandav commented Jun 28, 2024

Currently crepe requires resampy>=0.2.0,<0.3.0. The problem is that versions of resampy within that range do not work with Python 3.12:

$ docker run --rm python:3.12 pip install resampy==0.2.2
Collecting resampy==0.2.2
  Downloading resampy-0.2.2.tar.gz (323 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 323.4/323.4 kB 3.0 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-jlno0zv0/resampy_5f2a2a60b1594dfc8ec1f1e16ad51fdb/setup.py", line 2, in <module>
          import imp
      ModuleNotFoundError: No module named 'imp'
      [end of output]

However resampy==0.3.0 (and higher) works:

$  docker run --rm python:3.12 pip install resampy==0.3.0
...
Successfully installed llvmlite-0.43.0 numba-0.60.0 numpy-2.0.0 resampy-0.3.0

This PR relaxes the resampy<0.3.0 requirement to allow crepe to work with python3.12

Currently crepe requires `resampy>=0.2.0,<0.3.0`. The problem is that versions of resampy within that range do not work with Python 3.12:

```
$ docker run --rm python:3.12 pip install resampy==0.2.2
Collecting resampy==0.2.2
  Downloading resampy-0.2.2.tar.gz (323 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 323.4/323.4 kB 3.0 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-jlno0zv0/resampy_5f2a2a60b1594dfc8ec1f1e16ad51fdb/setup.py", line 2, in <module>
          import imp
      ModuleNotFoundError: No module named 'imp'
      [end of output]
```

However `resampy==0.3.0` (and higher) works:

```
$  docker run --rm -it python:3.12 pip install resampy==0.3.0
...
Successfully installed llvmlite-0.43.0 numba-0.60.0 numpy-2.0.0 resampy-0.3.0
```

This PR relaxes the `resampy<0.3.0` requirement to allow crepe to work with python3.12
@pierreguillot
Copy link

FYI I've tested it and it solves the problem 👍 It is related to #101.

@jongwook jongwook merged commit ed06fa7 into marl:master Aug 19, 2024
@tandav
Copy link
Contributor Author

tandav commented Aug 19, 2024

@jongwook can you also bump version and update pypi package?

@jongwook
Copy link
Member

just added https://pypi.org/project/crepe/0.0.16/

@tandav
Copy link
Contributor Author

tandav commented Aug 19, 2024

Thank you! ❤️

tandav added a commit to tandav/pitch-detectors that referenced this pull request Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants