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

Unable to complete installation on Mac OSX #2

Open
breandan opened this issue May 16, 2023 · 3 comments
Open

Unable to complete installation on Mac OSX #2

breandan opened this issue May 16, 2023 · 3 comments

Comments

@breandan
Copy link

I tried both the Docker and pip installations in various configurations, but was unable to complete the setup instructions.

Docker installation error
...
#11 844.0   Preparing metadata (setup.py): started
#11 844.2   Preparing metadata (setup.py): finished with status 'error'
#11 844.2   error: subprocess-exited-with-error
#11 844.2   
#11 844.2   × python setup.py egg_info did not run successfully.
#11 844.2   │ exit code: 1
#11 844.2   ╰─> [14 lines of output]
#11 844.2       Traceback (most recent call last):
#11 844.2         File "<string>", line 2, in <module>
#11 844.2         File "<pip-setuptools-caller>", line 34, in <module>
#11 844.2         File "/tmp/pip-install-tw2_hep8/grpcio-tools_7eb3de9ccbb349399acf4e4b62afa677/setup.py", line 182, in <module>
#11 844.2           ext_modules=maybe_cythonize([
#11 844.2         File "/tmp/pip-install-tw2_hep8/grpcio-tools_7eb3de9ccbb349399acf4e4b62afa677/setup.py", line 176, in maybe_cythonize
#11 844.2           return Build.cythonize(exts)
#11 844.2         File "/usr/local/lib/python3.10/dist-packages/Cython/Build/Dependencies.py", line 973, in cythonize
#11 844.2           module_list, module_metadata = create_extension_list(
#11 844.2         File "/usr/local/lib/python3.10/dist-packages/Cython/Build/Dependencies.py", line 816, in create_extension_list
#11 844.2           for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
#11 844.2         File "/usr/local/lib/python3.10/dist-packages/Cython/Build/Dependencies.py", line 114, in nonempty
#11 844.2           raise ValueError(error_msg)
#11 844.2       ValueError: 'grpc_tools/_protoc_compiler.pyx' doesn't match any files
#11 844.2       [end of output]
#11 844.2   
#11 844.2   note: This error originates from a subprocess, and is likely not a problem with pip.
#11 844.2 error: metadata-generation-failed
#11 844.2 
#11 844.2 × Encountered error while generating package metadata.
#11 844.2 ╰─> See above for output.
#11 844.2 
#11 844.2 note: This is an issue with the package mentioned above, not pip.
#11 844.2 hint: See above for details.
------
executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1
pip installation error
...
  Using cached grpcio_tools-1.0.3.tar.gz (1.7 MB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/breandan/miniconda3/envs/cstk/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tx/r87mmq817wz490jrtmx17ty80000gn/T/pip-install-jaw8heal/grpcio-tools_d831db5df92c4fff98cbab4516c0cd9b/setup.py'"'"'; __file__='"'"'/private/var/folders/tx/r87mmq817wz490jrtmx17ty80000gn/T/pip-install-jaw8heal/grpcio-tools_d831db5df92c4fff98cbab4516c0cd9b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/tx/r87mmq817wz490jrtmx17ty80000gn/T/pip-pip-egg-info-2sk_hcpm
       cwd: /private/var/folders/tx/r87mmq817wz490jrtmx17ty80000gn/T/pip-install-jaw8heal/grpcio-tools_d831db5df92c4fff98cbab4516c0cd9b/
  Complete output (13 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/tx/r87mmq817wz490jrtmx17ty80000gn/T/pip-install-jaw8heal/grpcio-tools_d831db5df92c4fff98cbab4516c0cd9b/setup.py", line 182, in <module>
      ext_modules=maybe_cythonize([
    File "/private/var/folders/tx/r87mmq817wz490jrtmx17ty80000gn/T/pip-install-jaw8heal/grpcio-tools_d831db5df92c4fff98cbab4516c0cd9b/setup.py", line 176, in maybe_cythonize
      return Build.cythonize(exts)
    File "/Users/breandan/miniconda3/envs/cstk/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 973, in cythonize
      module_list, module_metadata = create_extension_list(
    File "/Users/breandan/miniconda3/envs/cstk/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 816, in create_extension_list
      for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
    File "/Users/breandan/miniconda3/envs/cstk/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 114, in nonempty
      raise ValueError(error_msg)
  ValueError: 'grpc_tools/_protoc_compiler.pyx' doesn't match any files
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/ed/60/d69b6e82c6280c64a1f8aa1d1fa7736e3888fc5efdd7a502c208480aec84/grpcio_tools-1.0.3.tar.gz#sha256=98a0781d8e83c96d56081c77d595f8223b74d7355db44bd69258e5f3aa5ce011 (from https://pypi.org/simple/grpcio-tools/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached grpcio_tools-1.0.2.tar.gz (1.7 MB)
  Preparing metadata (setup.py) ... done
  Using cached grpcio_tools-1.0.1.tar.gz (1.7 MB)
  Preparing metadata (setup.py) ... done
  Using cached grpcio_tools-1.0.0.tar.gz (1.7 MB)
  Preparing metadata (setup.py) ... done
  Using cached grpcio_tools-0.15.1.tar.gz (1.7 MB)
  Preparing metadata (setup.py) ... done
  Using cached grpcio_tools-0.14.0.tar.gz (21 kB)
  Preparing metadata (setup.py) ... done

One thing I noticed is that pip installation takes many hours and seems to get stuck in a loop trying to install grpcio_tools. Dockerfile needs a few changes to get past a few initial errors, I changed line 6 to RUN apt-get update && apt-get -y install python3 pip ffmpeg git added RUN pip install Cython and changed line 13 to COPY . ./whisper-server but I was unable to get past ValueError: 'grpc_tools/_protoc_compiler.pyx' doesn't match any files.

@nalbion
Copy link
Owner

nalbion commented May 19, 2023

Can pull and try again @breandan ?

@breandan
Copy link
Author

Okay, that seemed to partially fix the issue. I was able to build the Docker image successfully, however Docker for Mac does not support /dev/snd and I have not tried configuring PulseAudio. Maybe it would be possible to serve an HTTP endpoint for audio input like AWS Lex? Still having some difficulty completing the pip installation as there are several dependencies listed in requirements.txt incompatible with ARM (e.g., hmmlearn/hmmlearn#475, pyannote/pyannote-audio#1321). Maybe I should give whisper.cpp a try instead, it seems to have better support for M1/ARM at the moment.

@nalbion
Copy link
Owner

nalbion commented May 19, 2023

I've been trying to get whisper.cpp working from Java here:

The more current work is here:

If I can figure out how to build whisper_java.dll and whisper_java.so...

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