MOSS-TTS-Nano icon indicating copy to clipboard operation
MOSS-TTS-Nano copied to clipboard

python=3.12环境在编译 pynini 时无法找到它依赖的 openfst 头文件

Open Yeahmj opened this issue 7 months ago • 2 comments

clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/Users/v_yemianjun/.pyenv/versions/3.12.3/include/python3.12 -c extensions/_pywrapfst.cpp -o build/temp.macosx-14.4-arm64-cpython-312/extensions/_pywrapfst.o -std=c++17 -Wno-register -Wno-deprecated-declarations -Wno-unused-function -Wno-unused-local-typedefs -funsigned-char -stdlib=libc++ -mmacosx-version-min=10.12 extensions/_pywrapfst.cpp:1190:10: fatal error: 'fst/util.h' file not found #include <fst/util.h> ^~~~~~~~~~~~ 1 error generated. error: command '/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 pynini Failed to build pynini ERROR: Could not build wheels for pynini, which is required to install pyproject.toml-based projects

Yeahmj avatar Apr 15 '26 10:04 Yeahmj

您好, 可以尝试手动安装 pynini 和 WeTextProcessing

conda install -c conda-forge pynini=2.1.6.post1 -y
pip install git+https://github.com/WhizZest/WeTextProcessing.git
pip install -r requirements.txt

gyt1145028706 avatar Apr 15 '26 10:04 gyt1145028706

pynini

If you are using Windows without Conda, you can download the package from the link and install it. However, after installation, you need to modify the version number of the pynini package in your virtual environment (for example, in my case: .venv\Lib\site-packages\pynini_init_.py): change __version__ = "2.1.6.post1" to __version__ = "2.1.6". Then, install both pynini and WeTextProcessing, and it should work.

surfincanoy avatar Apr 17 '26 09:04 surfincanoy