coqui-ai / TTS

🐸💬 - a deep learning toolkit for Text-to-Speech, battle-tested in research and production
http://coqui.ai
Mozilla Public License 2.0
31.64k stars 3.78k forks source link

Can't install TTL on Windows 11: Could not build wheels for TTS #3722

Open DarthJahus opened 1 month ago

DarthJahus commented 1 month ago

Describe the bug

      C:\Python311\include\pyconfig.h(207): fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'basetsd.h'ÿ: No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\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 TTS
Failed to build TTS
ERROR: Could not build wheels for TTS, which is required to install pyproject.toml-based projects

To Reproduce

Installing via pip install TTS

Expected behavior

TTS installs :)

Logs

Here's full trace: https://pastebin.com/UR8cxjY9

Environment

I did install VC++ Build Tools (even though I do not understand why it has to compile anything locally and should rely on software external to Python).
![image](https://github.com/coqui-ai/TTS/assets/7353366/acf3823e-9f76-425b-ab80-db533b2a2779)

- Windows version: 23H2 (22631.3447)
- Python 3.11.9

Additional context

No response

RedBluePrinter commented 1 month ago

Hello @DarthJahus

I had the same Issue.

Please Update your Visual Studio or reinstall the BuildTools from the Visual Studio Updater to fix the issue.

Before: amd64-cpython-39\Release\TTS/tts/utils/monotonic_align/core.obj core.c C:\Users\justi\anaconda3\envs\tts\include\pyconfig.h(200): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

After: Building wheels for collected packages: TTS Building wheel for TTS (pyproject.toml) ... done Created wheel for TTS: filename=TTS-0.22.0-cp39-cp39-win_amd64.whl size=903473 sha256=39a25d65d4d786c2187bfa0e21f544021b85868c8b92701ad02035bd4d3da89d Stored in directory: c:\users\justi\appdata\local\pip\cache\wheels\e9\94\e7\52e526c3ef9c07ac0b67a7dce87f81b6fb83ffd2d1754224e3 Successfully built TTS

Artificiangel commented 1 month ago

Microsoft Visual Studio\2022\Community\VC\Tools\MSVC

Thanks! I've been having issues for months, never could figure it out, reinstalled buildtools numerous times, tried many versions and set a whole bunch of paths manually for python. But this led me to the solution!

Instead of buildtools found in Program Files (x86)\Microsoft Visual Studio 14.0 Using Program Files\Microsoft Visual Studio\2022 worked.

I then ran into a new error LNK1158 cannot run rc.exe which wasn't too bad to fix.

RedBluePrinter commented 1 month ago

It is always good to have your Visual Studio Up to date. I tried it again on my laptop (for good measure) and it seems that the old installation I had has not worked... But after a quick update from the installer everything went fine again. 😃

RedBluePrinter commented 1 month ago

If it still not works could you please provide me with components you have installed on you VSC 2022? (You can find a list In the MS VSC Installer)

stale[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

DarthJahus commented 1 week ago

No reason de close it. Last comment says it's still an issue.