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

audiostream installation error on MacOS M1 #57

Open
muchhar opened this issue Sep 4, 2024 · 0 comments
Open

audiostream installation error on MacOS M1 #57

muchhar opened this issue Sep 4, 2024 · 0 comments

Comments

@muchhar
Copy link

muchhar commented Sep 4, 2024

I am trying to install audiostream by pip3 install git+https://github.com/kivy/audiostream.git
I am using Cython 3.0.0

Error is Cython.Compiler.Errors.CompileError: audiostream/platform/plat_mac.pyx

Here is full logs

`Collecting git+https://github.com/kivy/audiostream.git
Cloning https://github.com/kivy/audiostream.git to /private/var/folders/zc/7lykz_wn5lj868v_02djsc8h0000gn/T/pip-req-build-qkxh8z9d
Running command git clone --filter=blob:none --quiet https://github.com/kivy/audiostream.git /private/var/folders/zc/7lykz_wn5lj868v_02djsc8h0000gn/T/pip-req-build-qkxh8z9d
Resolved https://github.com/kivy/audiostream.git to commit 69f6b10
Preparing metadata (setup.py) ... done
Building wheels for collected packages: audiostream
Building wheel for audiostream (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [63 lines of output]
Compiling audiostream/platform/plat_mac.pyx because it changed.
[1/1] Cythonizing audiostream/platform/plat_mac.pyx
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /private/var/folders/zc/7lykz_wn5lj868v_02djsc8h0000gn/T/pip-req-build-qkxh8z9d/audiostream/platform/plat_mac.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
warning: audiostream/platform/../config.pxi:1:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See cython/cython#4310

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          if py_audio_callback is None:
              return
          py_audio_callback(buf[:buffersize])
  
  cdef void init():
      audiostream_cy_register(cy_audio_callback)
                              ^
  ------------------------------------------------------------
  
  audiostream/platform/plat_mac.pyx:36:28: Cannot assign type 'void (char *, int) except * nogil' to 'audio_callback_t'
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/var/folders/zc/7lykz_wn5lj868v_02djsc8h0000gn/T/pip-req-build-qkxh8z9d/setup.py", line 103, in <module>
      setup(
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
      self.run_command(cmd)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/dist.py", line 950, in run_command
      super().run_command(command)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/command/bdist_wheel.py", line 384, in run
      self.run_command("build")
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/dist.py", line 950, in run_command
      super().run_command(command)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/dist.py", line 950, in run_command
      super().run_command(command)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
      self.build_extensions()
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
      self._build_extensions_serial()
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
      self.build_extension(ext)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/Cython/Distutils/build_ext.py", line 122, in build_extension
      new_ext = cythonize(
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
      cythonize_one(*args)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: audiostream/platform/plat_mac.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for audiostream
Running setup.py clean for audiostream
Failed to build audiostream
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (audiostream)`

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

1 participant