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

build issue with pip install librosa, pip install noisereduce #1297

Closed
ShiaoFuk opened this issue Nov 17, 2024 · 4 comments
Closed

build issue with pip install librosa, pip install noisereduce #1297

ShiaoFuk opened this issue Nov 17, 2024 · 4 comments

Comments

@ShiaoFuk
Copy link

ShiaoFuk commented Nov 17, 2024

   ERROR: Command errored out with exit status 1:
     command: 'X:\pythonEnv\Scripts\python.exe' -S -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\10904\\AppData\\Local\\Temp\\pip-install-xun81ep5\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\10904\\AppData\\Local\\Temp\\pip-install-xun81ep5\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' --no-user-cfg egg_info --egg-base pip-egg-info
         cwd: C:\Users\10904\AppData\Local\Temp\pip-install-xun81ep5\matplotlib\
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\10904\AppData\Local\Temp\pip-install-xun81ep5\matplotlib\setup.py", line 40, in <module>
        import setupext
      File "C:\Users\10904\AppData\Local\Temp\pip-install-xun81ep5\matplotlib\setupext.py", line 19, in <module>
        from pybind11.setup_helpers import Pybind11Extension
    ModuleNotFoundError: No module named 'pybind11'

when I was installing noisereduce by pip the error occur.
the same problem with pip install librosa "no module name Cpython" though I had added "install CPython".
If somebody could solve I would sincerely appreciate!!!

@mhsmith
Copy link
Member

mhsmith commented Nov 18, 2024

For librosa, see #834 (comment).

noisereduce installs fine for me. If you still have problems, please post:

  • The complete build log – to show it, click the “Build: failed” caption to the left of the error.
  • The relevant parts of your build.gradle file
  • Which Chaquopy version you're using

@ShiaoFuk
Copy link
Author

ShiaoFuk commented Nov 18, 2024

I success on installing noisereduce by removing --index-url from other respository.
However I still fail on installing librosa.

    python {
        buildPython "X:\\pythonEnv\\Scripts\\python.exe"
        pip {
            options "--no-cache-dir"
            install "librosa==0.9.2"
            install "resampy==0.3.1"
            install "numpy"
            install "scipy"
            install "tensorflow"
            install "audiomentations"
            install "tqdm"
            install "noisereduce"
        }
    }

and this is the buid error output:

Collecting numpy-rms<1,>=0.4.2 (from audiomentations)
  Downloading https://files.pythonhosted.org/packages/b1/d8/6fc4d9409ecc9ff84fb3c6ad43c48f11331f8f6f51accc412287a0b349fd/numpy_rms-0.4.2.tar.gz
  WARNING: Generating metadata for package numpy-rms produced metadata for project name unknown. Fix your #egg=numpy-rms fragments.
Collecting soxr<1.0.0,>=0.3.2 (from audiomentations)
  WARNING: Generating metadata for package numpy-rms produced metadata for project name unknown. Fix your #egg=numpy-rms fragments.

  Downloading https://files.pythonhosted.org/packages/49/31/f24193672d07964cbf85f2e7af3b45936e1c76e44eb5ad97199865e2dcf8/soxr-0.3.7.tar.gz (296kB)
    ERROR: Command errored out with exit status 1:
     command: 'X:\pythonEnv\Scripts\python.exe' -S -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\10904\\AppData\\Local\\Temp\\pip-install-fhfrhwcx\\soxr\\setup.py'"'"'; __file__='"'"'C:\\Users\\10904\\AppData\\Local\\Temp\\pip-install-fhfrhwcx\\soxr\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' --no-user-cfg egg_info --egg-base pip-egg-info
         cwd: C:\Users\10904\AppData\Local\Temp\pip-install-fhfrhwcx\soxr\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\10904\AppData\Local\Temp\pip-install-fhfrhwcx\soxr\setup.py", line 147, in <module>
        from Cython.Build import cythonize
    ModuleNotFoundError: No module named 'Cython'
    ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    ERROR: Command errored out with exit status 1:

    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

ERROR: Failed to install soxr<1.0.0,>=0.3.2 from https://files.pythonhosted.org/packages/49/31/f24193672d07964cbf85f2e7af3b45936e1c76e44eb5ad97199865e2dcf8/soxr-0.3.7.tar.gz (from audiomentations).
For assistance, please raise an issue at https://github.com/chaquo/chaquopy/issues.
Failed to install soxr<1.0.0,>=0.3.2 from https://files.pythonhosted.org/packages/49/31/f24193672d07964cbf85f2e7af3b45936e1c76e44eb5ad97199865e2dcf8/soxr-0.3.7.tar.gz (from audiomentations).

Chaquopy: Exit status 1

@ShiaoFuk
Copy link
Author

the same problem occur while installing "audiomentations"

@mhsmith
Copy link
Member

mhsmith commented Nov 19, 2024

I think you must be using an old version of Chaquopy which doesn't use the current repository. Check the version of com.chaquo.python in your app's top-level build.gradle file, and update it to be as new as possible.

Even then, the current version of audiomentations still won't install:

  • It requires newer versions of numba and numpy than we currently have for Python 3.8. It might be possible to work around this by using an older version of audiomentations, just as you already are for librosa.

  • It requires msgpack, for which there's a workaround in #1299.

  • It requires numpy-rms and numpy-minmax, which we don't currently support at all. This also might be possible to work around by using an older version of audiomentations; otherwise, you'll have to build them yourself.

@mhsmith mhsmith mentioned this issue Nov 26, 2024
@mhsmith mhsmith closed this as completed Nov 26, 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

No branches or pull requests

2 participants