fix installation guide for macOS users on `lxml`
% python3 infer-web.py
Traceback (most recent call last):
File "infer-web.py", line 8, in <module>
from infer.modules.vc.modules import VC
File "/Users/aiden/SQuAD/Retrieval-based-Voice-Conversion-WebUI/infer/modules/vc/modules.py", line 19, in <module>
from infer.modules.vc.utils import *
File "/Users/aiden/SQuAD/Retrieval-based-Voice-Conversion-WebUI/infer/modules/vc/utils.py", line 3, in <module>
from fairseq import checkpoint_utils
File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/fairseq/__init__.py", line 40, in <module>
import fairseq.scoring # noqa
File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/fairseq/scoring/__init__.py", line 55, in <module>
importlib.import_module("fairseq.scoring." + module)
File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/fairseq/scoring/bleu.py", line 14, in <module>
from fairseq.scoring.tokenizer import EvaluationTokenizer
File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/fairseq/scoring/tokenizer.py", line 8, in <module>
import sacrebleu as sb
File "/Users/aiden/miniconda3/envs/rvc/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 "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/sacrebleu/utils.py", line 597, in <module>
from .dataset import DATASETS, SUBSETS, DOMAINS, COUNTRIES
File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/sacrebleu/dataset/__init__.py", line 73, in <module>
from .wmt_xml import WMTXMLDataset
File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/sacrebleu/dataset/wmt_xml.py", line 3, in <module>
import lxml.etree as ET
ImportError: dlopen(/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/lxml/etree.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'
ref: https://github.com/langchain-ai/chat-langchain/issues/213#issuecomment-1801888563 Quote:
I was able to solve this by doing
First Install:
brew install libxml2
brew install libxslt
And then doing this:
pip install lxml==4.9.2
I still have the same error on mac m2 max
I still have the same error on mac m2 max
I'm pretty sure the above commands will work. You may double check your current python env and/or if these packages are installed to the right env.
If I install it the normal manual way (using conda python 3.8), the installation can be successful, however when I run convert on the model I have trained, the process takes forever.
- If I run run.sh, I will get the error as described even though I have installed the command as you instructed.
- If running on Windows parallels, conversion and training are completely normal (However very slow)
If I install it the normal manual way (using conda), the installation can be successful, however when I run convert on the model I have trained, the process takes forever.
- If you run run.sh, you will get the error as described even though you have installed the command as you instructed.
- If running on Windows parallels, conversion and training are completely normal (However very slow)
Do NOT use run.sh. venv is NOT conda.
Run python xxxx.py instead.
I successfully reinstalled it on Mac M2 Max according to the instructions, but when I run inference I get the error below and the program automatically crashes.
Python.framework/Versions/3.8/lib/python3.8/multiprocessing/resource_tracker.py:216: 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 '
Well I fixed it, just reinstalling faiss-cpu is enough pip install faiss-cpu==1.7.0
sorry new to this , so i tired to install it using run.sh and got the exact error
tried to fix it with
brew install libxml2 brew install libxslt
and used
pip3 install lxml==4.9.2
then tried to start the app with run.sh and still getting the same error
want to try this but not really sure which file to use as xxx
Run python xxxx.py instead.```
could you please explain this ?
@jathoo run.sh does this command by default but there are some things wrong when running the rest of run.sh in OSX So instead run this: python infer-web.py
conda install lxml fixed this issue for me on my M1
I was unable to pip install lxml on my macOS M2 PRO, but thanks to the tip provided by @burakaydinofficial, I was able to successfully get it installed using the command below.
conda install lxml
% python3 infer-web.py Traceback (most recent call last): File "infer-web.py", line 8, in <module> from infer.modules.vc.modules import VC File "/Users/aiden/SQuAD/Retrieval-based-Voice-Conversion-WebUI/infer/modules/vc/modules.py", line 19, in <module> from infer.modules.vc.utils import * File "/Users/aiden/SQuAD/Retrieval-based-Voice-Conversion-WebUI/infer/modules/vc/utils.py", line 3, in <module> from fairseq import checkpoint_utils File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/fairseq/__init__.py", line 40, in <module> import fairseq.scoring # noqa File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/fairseq/scoring/__init__.py", line 55, in <module> importlib.import_module("fairseq.scoring." + module) File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/fairseq/scoring/bleu.py", line 14, in <module> from fairseq.scoring.tokenizer import EvaluationTokenizer File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/fairseq/scoring/tokenizer.py", line 8, in <module> import sacrebleu as sb File "/Users/aiden/miniconda3/envs/rvc/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 "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/sacrebleu/utils.py", line 597, in <module> from .dataset import DATASETS, SUBSETS, DOMAINS, COUNTRIES File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/sacrebleu/dataset/__init__.py", line 73, in <module> from .wmt_xml import WMTXMLDataset File "/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/sacrebleu/dataset/wmt_xml.py", line 3, in <module> import lxml.etree as ET ImportError: dlopen(/Users/aiden/miniconda3/envs/rvc/lib/python3.8/site-packages/lxml/etree.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'ref: langchain-ai/chat-langchain#213 (comment) Quote:
I was able to solve this by doing First Install: brew install libxml2 brew install libxslt And then doing this: pip install lxml==4.9.2
Worked here!
This issue was closed because it has been inactive for 15 days since being marked as stale.