cocktailpeanutlabs / openvoice2

9 stars 0 forks source link

Fails to build on Apple M2 MacBook Pro - clang' failed with exit code 1 #2

Open raisindetre opened 4 months ago

raisindetre commented 4 months ago

Trying to run OpenVoice2 fails on Apple M2 Macbook Pro with the error below.

      /Users/devone/Documents/Projects/Pinokio/bin/miniconda/include/python3.10/Python.h:25:10: fatal error: 'stdio.h' file not found
      #include <stdio.h>
               ^~~~~~~~~
      1 error generated.
      error: command '/Library/Developer/CommandLineTools/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for dtw-python
Failed to build dtw-python
ERROR: Could not build wheels for dtw-python, which is required to install pyproject.toml-based projects
clang -v
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
ande4485 commented 3 months ago

👍 , on MacBook M1 : I'll try to run french OpenVoice2 instance and get :

The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit https://support.apple.com/kb/HT208050. <> eval "$(conda shell.bash hook)" && conda deactivate && conda deactivate && conda deactivate && conda activate base && source /Users/pinokio/api/openvoice2.git/app/env/bin/activate /Users/pinokio/api/openvoice2.git/app/env && pip uninstall -y mecab-python3 python-mecab-ko && pip install -U mecab-python3==1.0.5 && python app.py FR Found existing installation: mecab-python3 1.0.5 Uninstalling mecab-python3-1.0.5: Successfully uninstalled mecab-python3-1.0.5 WARNING: Skipping python-mecab-ko as it is not installed. Collecting mecab-python3==1.0.5 Using cached mecab_python3-1.0.5-cp310-cp310-macosx_11_0_arm64.whl Installing collected packages: mecab-python3 Successfully installed mecab-python3-1.0.5 objc[71481]: Class AVFFrameReceiver is implemented in both /Users/pinokio/bin/miniconda/lib/libavdevice.60.3.100.dylib (0x30c838768) and /Users/pinokio/api/openvoice2.git/app/env/lib/python3.10/site-packages/av/.dylibs/libavdevice.59.7.100.dylib (0x30f9b4778). One of the two will be used. Which one is undefined. objc[71481]: Class AVFAudioReceiver is implemented in both /Users/pinokio/bin/miniconda/lib/libavdevice.60.3.100.dylib (0x30c8387b8) and /Users/pinokio/api/openvoice2.git/app/env/lib/python3.10/site-packages/av/.dylibs/libavdevice.59.7.100.dylib (0x30f9b47c8). One of the two will be used. Which one is undefined. Traceback (most recent call last): File "/Users/pinokio/api/openvoice2.git/app/app.py", line 10, in from OpenVoice import se_extractor File "/Users/pinokio/api/openvoice2.git/app/OpenVoice/se_extractor.py", line 8, in from whisper_timestamped.transcribe import get_audio_tensor, get_vad_segments File "/Users/pinokio/api/openvoice2.git/app/env/lib/python3.10/site-packages/whisper_timestamped/init.py", line 7, in from .transcribe import transcribe_timestamped File "/Users/pinokio/api/openvoice2.git/app/env/lib/python3.10/site-packages/whisper_timestamped/transcribe.py", line 27, in import dtw File "/Users/pinokio/api/openvoice2.git/app/env/lib/python3.10/site-packages/dtw/init.py", line 17, in from dtw.dtw import * File "/Users/pinokio/api/openvoice2.git/app/env/lib/python3.10/site-packages/dtw/dtw.py", line 36, in from dtw._globalCostMatrix import _globalCostMatrix File "/Users/pinokio/api/openvoice2.git/app/env/lib/python3.10/site-packages/dtw/_globalCostMatrix.py", line 3, in from dtw._dtw_utils import _computeCM_wrapper ImportError: dlopen(/Users/pinokio/api/openvoice2.git/app/env/lib/python3.10/site-packages/dtw/_dtw_utils.cpython-310-darwin.so, 0x0002): tried: '/Users/pinokio/api/openvoice2.git/app/env/lib/python3.10/site-packages/dtw/_dtw_utils.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/pinokio/api/openvoice2.git/app/env/lib/python3.10/site-packages/dtw/_dtw_utils.cpython-310-darwin.so' (no such file), '/Users/pinokio/api/openvoice2.git/app/env/lib/python3.10/site-packages/dtw/_dtw_utils.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))