[GH-ISSUE #1782] Macbook Pro M2 Pro issues with webUI Errors #1179

Open
opened 2026-10-20 10:06:40 +00:00 by bsakaguchi · 11 comments
Owner

Originally created by @InochiPM on GitHub (Jan 31, 2024).
Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1782

Okay so i know this might be a long shot but when trying to launch the webui from [sh run.sh] i get this error

Traceback (most recent call last):
  File "infer-web.py", line 26, in <module>
    from fairseq import checkpoint_utils
  File "/opt/homebrew/lib/python3.8/site-packages/fairseq/__init__.py", line 40, in <module>
    import fairseq.scoring  # noqa
  File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/__init__.py", line 55, in <module>
    importlib.import_module("fairseq.scoring." + module)
  File "/opt/homebrew/Cellar/python@3.8/3.8.18_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/bleu.py", line 14, in <module>
    from fairseq.scoring.tokenizer import EvaluationTokenizer
  File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/tokenizer.py", line 8, in <module>
    import sacrebleu as sb
  File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/__init__.py", line 21, in <module>
    from .utils import smart_open, SACREBLEU_DIR, download_test_set  # noqa: F401
  File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/utils.py", line 597, in <module>
    from .dataset import DATASETS, SUBSETS, DOMAINS, COUNTRIES
  File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/dataset/__init__.py", line 73, in <module>
    from .wmt_xml import WMTXMLDataset
  File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/dataset/wmt_xml.py", line 3, in <module>
    import lxml.etree as ET
ImportError: dlopen(/opt/homebrew/lib/python3.8/site-packages/lxml/etree.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'

when using my Intel macbook pro it throws this error when trying to use inference.

 UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

and when the ui works [mangio RVC] for instance
i get this error,

NotImplementedError: The operator 'aten::upsample_linear1d.out' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on https://github.com/pytorch/pytorch/issues/77764. As a temporary fix, you can set the environment variable `PYTORCH_ENABLE_MPS_FALLBACK=1` to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS.

Mind you i can get the actual UI to work on my intel macbook but i cant get it to launch on my m2 pro macbook at all.
Any ideas on how to fix these issues???

Originally created by @InochiPM on GitHub (Jan 31, 2024). Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1782 Okay so i know this might be a long shot but when trying to launch the webui from [sh run.sh] i get this error ``` Traceback (most recent call last): File "infer-web.py", line 26, in <module> from fairseq import checkpoint_utils File "/opt/homebrew/lib/python3.8/site-packages/fairseq/__init__.py", line 40, in <module> import fairseq.scoring # noqa File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/__init__.py", line 55, in <module> importlib.import_module("fairseq.scoring." + module) File "/opt/homebrew/Cellar/python@3.8/3.8.18_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/bleu.py", line 14, in <module> from fairseq.scoring.tokenizer import EvaluationTokenizer File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/tokenizer.py", line 8, in <module> import sacrebleu as sb File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/__init__.py", line 21, in <module> from .utils import smart_open, SACREBLEU_DIR, download_test_set # noqa: F401 File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/utils.py", line 597, in <module> from .dataset import DATASETS, SUBSETS, DOMAINS, COUNTRIES File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/dataset/__init__.py", line 73, in <module> from .wmt_xml import WMTXMLDataset File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/dataset/wmt_xml.py", line 3, in <module> import lxml.etree as ET ImportError: dlopen(/opt/homebrew/lib/python3.8/site-packages/lxml/etree.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister' ``` when using my Intel macbook pro it throws this error when trying to use inference. ``` UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d ' ``` and when the ui works [mangio RVC] for instance i get this error, ``` NotImplementedError: The operator 'aten::upsample_linear1d.out' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on https://github.com/pytorch/pytorch/issues/77764. As a temporary fix, you can set the environment variable `PYTORCH_ENABLE_MPS_FALLBACK=1` to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS. ``` Mind you i can get the actual UI to work on my intel macbook but i cant get it to launch on my m2 pro macbook at all. Any ideas on how to fix these issues???
Author
Owner

@InochiPM commented on GitHub (Jan 31, 2024):

Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/gradio/routes.py", line 437, in run_predict
    output = await app.get_blocks().process_api(
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/gradio/blocks.py", line 1349, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/gradio/blocks.py", line 1283, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/gradio/components.py", line 2586, in postprocess
    file_path = self.audio_to_temp_file(
  File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/gradio/components.py", line 360, in audio_to_temp_file
    temp_dir = Path(dir) / self.hash_bytes(data.tobytes())
AttributeError: 'NoneType' object has no attribute 'tobytes'

is what i get now.

<!-- gh-comment-id:1920184350 --> @InochiPM commented on GitHub (Jan 31, 2024): ``` Traceback (most recent call last): File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/gradio/routes.py", line 437, in run_predict output = await app.get_blocks().process_api( File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/gradio/blocks.py", line 1349, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/gradio/blocks.py", line 1283, in postprocess_data prediction_value = block.postprocess(prediction_value) File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/gradio/components.py", line 2586, in postprocess file_path = self.audio_to_temp_file( File "/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/site-packages/gradio/components.py", line 360, in audio_to_temp_file temp_dir = Path(dir) / self.hash_bytes(data.tobytes()) AttributeError: 'NoneType' object has no attribute 'tobytes' ``` is what i get now.
Author
Owner

@THE-SINDOL commented on GitHub (Feb 3, 2024):

IS mangio rvc ? Or rvc project you download ?

<!-- gh-comment-id:1925205561 --> @THE-SINDOL commented on GitHub (Feb 3, 2024): IS mangio rvc ? Or rvc project you download ?
Author
Owner

@InochiPM commented on GitHub (Feb 3, 2024):

IS mangio rvc ? Or rvc project you download ?

Its this one, RVC Project.

<!-- gh-comment-id:1925373780 --> @InochiPM commented on GitHub (Feb 3, 2024): > IS mangio rvc ? Or rvc project you download ? Its this one, RVC Project.
Author
Owner

@jathoo commented on GitHub (Feb 22, 2024):

looks like a lot of people are getting this error

<!-- gh-comment-id:1959793191 --> @jathoo commented on GitHub (Feb 22, 2024): looks like a lot of people are getting this error
Author
Owner

@iamzhangyunlu commented on GitHub (Feb 25, 2024):

@InochiPM @InochiPM execute "export PYTORCH_ENABLE_MPS_FALLBACK=1" first then run "python infer-web.py" when you're using Macbook M series chips

<!-- gh-comment-id:1962763928 --> @iamzhangyunlu commented on GitHub (Feb 25, 2024): @InochiPM @InochiPM execute "export PYTORCH_ENABLE_MPS_FALLBACK=1" first then run "python infer-web.py" when you're using Macbook M series chips
Author
Owner

@jathoo commented on GitHub (Feb 25, 2024):

Hi @inochiPM thanks for the answer, could you please let me know, how you fixed the issue on M2 mac ?

I can’t even get the UI working,

I am getting this error when using run.sh

Traceback (most recent call last):
  File "infer-web.py", line 26, in <module>
    from fairseq import checkpoint_utils
  File "/opt/homebrew/lib/python3.8/site-packages/fairseq/__init__.py", line 40, in <module>
    import fairseq.scoring  # noqa
  File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/__init__.py", line 55, in <module>
    importlib.import_module("fairseq.scoring." + module)
  File "/opt/homebrew/Cellar/python@3.8/3.8.18_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/bleu.py", line 14, in <module>
    from fairseq.scoring.tokenizer import EvaluationTokenizer
  File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/tokenizer.py", line 8, in <module>
    import sacrebleu as sb
  File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/__init__.py", line 21, in <module>
    from .utils import smart_open, SACREBLEU_DIR, download_test_set  # noqa: F401
  File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/utils.py", line 597, in <module>
    from .dataset import DATASETS, SUBSETS, DOMAINS, COUNTRIES
  File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/dataset/__init__.py", line 73, in <module>
    from .wmt_xml import WMTXMLDataset
  File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/dataset/wmt_xml.py", line 3, in <module>
    import lxml.etree as ET
ImportError: dlopen(/opt/homebrew/lib/python3.8/site-packages/lxml/etree.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'``
<!-- gh-comment-id:1962859218 --> @jathoo commented on GitHub (Feb 25, 2024): Hi @inochiPM thanks for the answer, could you please let me know, how you fixed the issue on M2 mac ? I can’t even get the UI working, I am getting this error when using run.sh ``` Traceback (most recent call last): File "infer-web.py", line 26, in <module> from fairseq import checkpoint_utils File "/opt/homebrew/lib/python3.8/site-packages/fairseq/__init__.py", line 40, in <module> import fairseq.scoring # noqa File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/__init__.py", line 55, in <module> importlib.import_module("fairseq.scoring." + module) File "/opt/homebrew/Cellar/python@3.8/3.8.18_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/bleu.py", line 14, in <module> from fairseq.scoring.tokenizer import EvaluationTokenizer File "/opt/homebrew/lib/python3.8/site-packages/fairseq/scoring/tokenizer.py", line 8, in <module> import sacrebleu as sb File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/__init__.py", line 21, in <module> from .utils import smart_open, SACREBLEU_DIR, download_test_set # noqa: F401 File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/utils.py", line 597, in <module> from .dataset import DATASETS, SUBSETS, DOMAINS, COUNTRIES File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/dataset/__init__.py", line 73, in <module> from .wmt_xml import WMTXMLDataset File "/opt/homebrew/lib/python3.8/site-packages/sacrebleu/dataset/wmt_xml.py", line 3, in <module> import lxml.etree as ET ImportError: dlopen(/opt/homebrew/lib/python3.8/site-packages/lxml/etree.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'`` ```
Author
Owner

@R3D347HR4Y commented on GitHub (Feb 25, 2024):

@jathoo
Had this issue, fixed it by doing this:
brew install libxml2
brew install libxslt
pip install lxml==4.9.2

And when you try to run don't use run.sh, do this:
python infer-web.py

<!-- gh-comment-id:1962998249 --> @R3D347HR4Y commented on GitHub (Feb 25, 2024): @jathoo Had this issue, fixed it by doing this: brew install libxml2 brew install libxslt pip install lxml==4.9.2 And when you try to run don't use run.sh, do this: python infer-web.py
Author
Owner

@jathoo commented on GitHub (Feb 25, 2024):

Thanks , I did try all this steps , I can only run this command with pip3 , I guess i don’t have previous python version locally , but i am stuck with the same error.

‘’’ pip install lxml==4.9.2’’’

will it only work with pip not pip3 ?

<!-- gh-comment-id:1963023876 --> @jathoo commented on GitHub (Feb 25, 2024): Thanks , I did try all this steps , I can only run this command with pip3 , I guess i don’t have previous python version locally , but i am stuck with the same error. ‘’’ pip install lxml==4.9.2’’’ will it only work with pip not pip3 ?
Author
Owner

@jathoo commented on GitHub (Mar 1, 2024):

thanks, now I am getting this, No module named 'numpy'

I am new to Python and i wonder if there are issues with my path or something.
would be helpful if someone could make a shell file to run these commands that works please

<!-- gh-comment-id:1973892615 --> @jathoo commented on GitHub (Mar 1, 2024): thanks, now I am getting this, `No module named 'numpy'` I am new to Python and i wonder if there are issues with my path or something. would be helpful if someone could make a shell file to run these commands that works please
Author
Owner

@hoonlight commented on GitHub (Mar 7, 2024):

Same issue here

<!-- gh-comment-id:1983491528 --> @hoonlight commented on GitHub (Mar 7, 2024): Same issue here
Author
Owner

@herryqg commented on GitHub (Apr 22, 2024):

@jathoo, you need activate env first: ''. .venv/bin/activate''
then doing "pip install lxml==4.9.2" and ''python infer-web.py''

<!-- gh-comment-id:2068499623 --> @herryqg commented on GitHub (Apr 22, 2024): @jathoo, you need activate env first: ''. .venv/bin/activate'' then doing "pip install lxml==4.9.2" and ''python infer-web.py''
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
RVC-Project/Retrieval-based-Voice-Conversion-WebUI#1179
No description provided.