#RVC MacBook Pro m2 Pro inference problems

57 messages · Page 1 of 1 (latest)

thin frigate
#

I'm so tired of searching and searching on how to get this stuff running on my macbook pro.
Ive tried Mangio RVC and it throws an error,

I try sh run.sh and i get "Not implimented" errors

  File "infer-web.py", line 30, 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/[email protected]/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 i run on my intel based mac it throws another error

 ``` 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 '``` 

Can anyone heklp me out here? Inference is the only thing im trying to do here.
#

on the beta i get this error

#
  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/[email protected]/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'```
tiny sun
#

Not sure if you've had python installed before, but this looks like python modules conflicting

thin frigate
acoustic tulipBOT
#

@thin frigate has reached level 1. GG!

thin frigate
#

and hmmm okay so i should remove all version of python and then try again with a new install of python ?

thin frigate
#

anyone else got an ideas ?

silent kite
#

well, first of all

#

You shouldn't be running python 3.8

#

@thin frigate
ideally 3.10.6 or perhaps 3.9 could work ( maybe )

tiny sun
#

But boy the errors above are

silent kite
#

never knew mac version is 3.8 friendly

#

huh

#

or rvc in general(?)

#

can be wrong tho

tiny sun
#

RVC in general is 3.8-3.11 right ?

#

if you patch fairseq

silent kite
#

hmmmm, that's new

#

well, good to know then

#

thx for info

junior condor
old willow
#

any solutions? @silent kite (sorry to mention but i am facing the same problem on m1). Pls help.

silent kite
#

I'm not from support nor I use Mac

old willow
#

😦

acoustic tulipBOT
#

@old willow has reached level 1. GG!

thin frigate
#

No unfortunately

thin frigate
#

@old willow

old willow
#

yeah

#

u cant train models using applio on mac

#

u can just infer

#

@thin frigate

thin frigate
#

thats what i was trying ot do was infer.

#

I cant train at all cause it just gets stuck at 1 epoch

old willow
#

😦

#

mac is a big problem

#

The error you're encountering, "ImportError: dlopen(...): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'", indicates an issue with the lxml library on your Apple M1 MacBook Pro. This library is used by several other packages, including fairseq and sacrebleu in your case.

Here's what's causing the problem and how you can fix it:

The Issue:

  • The pre-built wheel files for lxml available through pip are not compatible with Apple M1 architecture. These files are typically compiled for specific CPU architectures and won't work on your M1 chip.

Solutions:

  1. Install lxml from source:

    This method involves building the library from scratch, ensuring it's compiled specifically for your M1 chip. Here's how:

    brew install libxml2 libxslt
    pip install --no-binary :all lxml
    

    This approach might take longer than installing pre-built wheels but ensures compatibility with your M1 Mac.

  2. Use a compatible virtual environment:

    If you're using multiple Python versions or environments, consider creating a new virtual environment with an M1-compatible Python version (e.g., Python 3.9 or later) and installing lxml using pip within that environment. This isolates the dependencies for this specific project and avoids conflicts with other Python installations.

  3. Consider alternative libraries:

    If lxml is not essential for your project, explore alternative libraries like beautifulsoup4 or html5lib that might offer similar functionality and are known to be compatible with M1 Macs.

Additional Tips:

  • Ensure you have the latest versions of pip and setuptools installed using pip install --upgrade pip setuptools.
  • Check online forums and communities specific to M1 Macs and Python development for troubleshooting tips and known compatibility issues.
#

got this from google gemini @thin frigate

#

try it once

junior condor
junior condor
thin frigate
#

lol Its okay for me cause i just need inferece. I got someone ot train my voicebank

junior condor
#

Okay ✅

old willow
#

is there any way we can train models on mac? @junior condor

junior condor
#

You can only train with an nvidia card

old willow
thin frigate
acoustic tulipBOT
#

@thin frigate has reached level 2. GG!

thin frigate
#

i just dont know how