Skip to content

1.0.4.1仅可以在Linux环境下安装成功,windows和mac下都无法安装成功 #292

@AskQi

Description

@AskQi

也都尝试过在conda中安装pynini,然后使用pip安装WeTextProcessing,发现1.0.3可以成功安装,但是1.0.4.1依旧报错
以下分别是Windows和macos下的报错
Windows下的报错:

D:\code\FlashTTS>pip install WeTextProcessing===1.0.4.1
Defaulting to user installation because normal site-packages is not writeable
Collecting WeTextProcessing===1.0.4.1
Using cached WeTextProcessing-1.0.4.1-py3-none-any.whl.metadata (7.2 kB)
Collecting pynini==2.1.6 (from WeTextProcessing===1.0.4.1)
Using cached pynini-2.1.6.tar.gz (789 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting importlib-resources (from WeTextProcessing===1.0.4.1)
Using cached importlib_resources-6.5.2-py3-none-any.whl.metadata (3.9 kB)
Using cached WeTextProcessing-1.0.4.1-py3-none-any.whl (2.0 MB)
Using cached importlib_resources-6.5.2-py3-none-any.whl (37 kB)
Building wheels for collected packages: pynini
Building wheel for pynini (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pynini (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [105 lines of output]
C:\Users\qida\AppData\Local\Temp\pip-build-env-btoy2igs\overlay\Lib\site-packages\setuptools\config_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: project.license as a TOML table is deprecated
!!

          ********************************************************************************
          Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).

          By 2026-Feb-18, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.

          See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
          ********************************************************************************

  !!
    corresp(dist, value, root_dir)
  C:\Users\qida\AppData\Local\Temp\pip-build-env-btoy2igs\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
  !!

          ********************************************************************************
          Please consider removing the following classifiers in favor of a SPDX license expression:

          License :: OSI Approved :: Apache Software License

          See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
          ********************************************************************************

  !!
    dist._finalize_license_expression()
  C:\Users\qida\AppData\Local\Temp\pip-build-env-btoy2igs\overlay\Lib\site-packages\setuptools\dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
  !!

          ********************************************************************************
          Please consider removing the following classifiers in favor of a SPDX license expression:

          License :: OSI Approved :: Apache Software License

          See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
          ********************************************************************************

  !!
    self._finalize_license_expression()
  running bdist_wheel
  running build
  running build_py
  creating build\lib.win-amd64-cpython-312\pynini
  copying pynini\__init__.py -> build\lib.win-amd64-cpython-312\pynini
  creating build\lib.win-amd64-cpython-312\pywrapfst
  copying pywrapfst\__init__.py -> build\lib.win-amd64-cpython-312\pywrapfst
  creating build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\examples\case.py -> build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\examples\chatspeak.py -> build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\examples\chatspeak_model.py -> build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\examples\dates.py -> build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\examples\g2p.py -> build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\examples\numbers.py -> build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\examples\plurals.py -> build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\examples\t9.py -> build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\examples\weather.py -> build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\examples\__init__.py -> build\lib.win-amd64-cpython-312\pynini\examples
  creating build\lib.win-amd64-cpython-312\pynini\export
  copying pynini\export\export.py -> build\lib.win-amd64-cpython-312\pynini\export
  copying pynini\export\grm.py -> build\lib.win-amd64-cpython-312\pynini\export
  copying pynini\export\grm_example.py -> build\lib.win-amd64-cpython-312\pynini\export
  copying pynini\export\multi_grm.py -> build\lib.win-amd64-cpython-312\pynini\export
  copying pynini\export\multi_grm_example.py -> build\lib.win-amd64-cpython-312\pynini\export
  copying pynini\export\__init__.py -> build\lib.win-amd64-cpython-312\pynini\export
  creating build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\byte.py -> build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\edit_transducer.py -> build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\features.py -> build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\paradigms.py -> build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\pynutil.py -> build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\rewrite.py -> build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\rule_cascade.py -> build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\stringfile.py -> build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\tagger.py -> build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\utf8.py -> build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\__init__.py -> build\lib.win-amd64-cpython-312\pynini\lib
  running egg_info
  writing pynini.egg-info\PKG-INFO
  writing dependency_links to pynini.egg-info\dependency_links.txt
  writing top-level names to pynini.egg-info\top_level.txt
  reading manifest file 'pynini.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  adding license file 'AUTHORS'
  writing manifest file 'pynini.egg-info\SOURCES.txt'
  copying pynini\BUILD.bazel -> build\lib.win-amd64-cpython-312\pynini
  copying pynini\__init__.pyi -> build\lib.win-amd64-cpython-312\pynini
  copying pynini\py.typed -> build\lib.win-amd64-cpython-312\pynini
  copying pywrapfst\BUILD.bazel -> build\lib.win-amd64-cpython-312\pywrapfst
  copying pywrapfst\__init__.pyi -> build\lib.win-amd64-cpython-312\pywrapfst
  copying pywrapfst\py.typed -> build\lib.win-amd64-cpython-312\pywrapfst
  copying pynini\examples\BUILD.bazel -> build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\examples\py.typed -> build\lib.win-amd64-cpython-312\pynini\examples
  copying pynini\export\BUILD.bazel -> build\lib.win-amd64-cpython-312\pynini\export
  copying pynini\export\grm_py_build_defs.bzl -> build\lib.win-amd64-cpython-312\pynini\export
  copying pynini\export\py.typed -> build\lib.win-amd64-cpython-312\pynini\export
  copying pynini\lib\BUILD.bazel -> build\lib.win-amd64-cpython-312\pynini\lib
  copying pynini\lib\py.typed -> build\lib.win-amd64-cpython-312\pynini\lib
  running build_ext
  building '_pywrapfst' extension
  creating build\temp.win-amd64-cpython-312\Release\extensions
  "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\ProgramData\anaconda3\include -IC:\ProgramData\anaconda3\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /EHsc /Tpextensions/_pywrapfst.cpp /Fobuild\temp.win-amd64-cpython-312\Release\extensions\_pywrapfst.obj -std=c++17 -Wno-register -Wno-deprecated-declarations -Wno-unused-function -Wno-unused-local-typedefs -funsigned-char
  cl: 命令行 error D8021 :无效的数值参数“/Wno-register”
  error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.43.34808\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  [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: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pynini)

macos下的报错:
(FlashTTS) qida@qidadeMacBook-Pro FlashTTS % pip install WeTextProcessing===1.0.4.1
Collecting WeTextProcessing===1.0.4.1
Using cached WeTextProcessing-1.0.4.1-py3-none-any.whl.metadata (7.2 kB)
Collecting pynini==2.1.6 (from WeTextProcessing===1.0.4.1)
Using cached pynini-2.1.6.tar.gz (789 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: importlib-resources in /opt/homebrew/anaconda3/envs/FlashTTS/lib/python3.12/site-packages (from WeTextProcessing===1.0.4.1) (6.5.2)
Using cached WeTextProcessing-1.0.4.1-py3-none-any.whl (2.0 MB)
Building wheels for collected packages: pynini
Building wheel for pynini (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pynini (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [108 lines of output]
/private/var/folders/xw/dvlwrx_d51j_6dkrn6yhfwz00000gn/T/pip-build-env-rc5vvz06/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: project.license as a TOML table is deprecated
!!

          ********************************************************************************
          Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
  
          By 2026-Feb-18, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.
  
          See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
          ********************************************************************************
  
  !!
    corresp(dist, value, root_dir)
  /private/var/folders/xw/dvlwrx_d51j_6dkrn6yhfwz00000gn/T/pip-build-env-rc5vvz06/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
  !!
  
          ********************************************************************************
          Please consider removing the following classifiers in favor of a SPDX license expression:
  
          License :: OSI Approved :: Apache Software License
  
          See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
          ********************************************************************************
  
  !!
    dist._finalize_license_expression()
  /private/var/folders/xw/dvlwrx_d51j_6dkrn6yhfwz00000gn/T/pip-build-env-rc5vvz06/overlay/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
  !!
  
          ********************************************************************************
          Please consider removing the following classifiers in favor of a SPDX license expression:
  
          License :: OSI Approved :: Apache Software License
  
          See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
          ********************************************************************************
  
  !!
    self._finalize_license_expression()
  running bdist_wheel
  running build
  running build_py
  creating build/lib.macosx-11.0-arm64-cpython-312/pywrapfst
  copying pywrapfst/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/pywrapfst
  creating build/lib.macosx-11.0-arm64-cpython-312/pynini
  copying pynini/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini
  creating build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/examples/chatspeak.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/examples/chatspeak_model.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/examples/weather.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/examples/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/examples/numbers.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/examples/plurals.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/examples/t9.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/examples/case.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/examples/dates.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/examples/g2p.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  creating build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/edit_transducer.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/utf8.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/features.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/pynutil.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/paradigms.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/tagger.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/stringfile.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/rule_cascade.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/rewrite.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/byte.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  creating build/lib.macosx-11.0-arm64-cpython-312/pynini/export
  copying pynini/export/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/export
  copying pynini/export/export.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/export
  copying pynini/export/multi_grm_example.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/export
  copying pynini/export/multi_grm.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/export
  copying pynini/export/grm.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/export
  copying pynini/export/grm_example.py -> build/lib.macosx-11.0-arm64-cpython-312/pynini/export
  running egg_info
  writing pynini.egg-info/PKG-INFO
  writing dependency_links to pynini.egg-info/dependency_links.txt
  writing top-level names to pynini.egg-info/top_level.txt
  reading manifest file 'pynini.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  adding license file 'AUTHORS'
  writing manifest file 'pynini.egg-info/SOURCES.txt'
  copying pywrapfst/BUILD.bazel -> build/lib.macosx-11.0-arm64-cpython-312/pywrapfst
  copying pywrapfst/__init__.pyi -> build/lib.macosx-11.0-arm64-cpython-312/pywrapfst
  copying pywrapfst/py.typed -> build/lib.macosx-11.0-arm64-cpython-312/pywrapfst
  copying pynini/BUILD.bazel -> build/lib.macosx-11.0-arm64-cpython-312/pynini
  copying pynini/__init__.pyi -> build/lib.macosx-11.0-arm64-cpython-312/pynini
  copying pynini/py.typed -> build/lib.macosx-11.0-arm64-cpython-312/pynini
  copying pynini/examples/BUILD.bazel -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/examples/py.typed -> build/lib.macosx-11.0-arm64-cpython-312/pynini/examples
  copying pynini/lib/BUILD.bazel -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/lib/py.typed -> build/lib.macosx-11.0-arm64-cpython-312/pynini/lib
  copying pynini/export/BUILD.bazel -> build/lib.macosx-11.0-arm64-cpython-312/pynini/export
  copying pynini/export/grm_py_build_defs.bzl -> build/lib.macosx-11.0-arm64-cpython-312/pynini/export
  copying pynini/export/py.typed -> build/lib.macosx-11.0-arm64-cpython-312/pynini/export
  running build_ext
  building '_pywrapfst' extension
  creating build/temp.macosx-11.0-arm64-cpython-312/extensions
  clang++ -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/anaconda3/envs/FlashTTS/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/anaconda3/envs/FlashTTS/include -arch arm64 -I/opt/homebrew/anaconda3/envs/FlashTTS/include/python3.12 -c extensions/_pywrapfst.cpp -o build/temp.macosx-11.0-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:1291:10: fatal error: 'fst/util.h' file not found
   1291 | #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: Failed to build installable wheels for some pyproject.toml based projects (pynini)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions