erew123 / alltalk_tts

AllTalk is based on the Coqui TTS engine, similar to the Coqui_tts extension for Text generation webUI, however supports a variety of advanced features, such as a settings page, low VRAM support, DeepSpeed, narrator, model finetuning, custom models, wav file maintenance. It can also be used with 3rd Party software via JSON calls.
GNU Affero General Public License v3.0
1.05k stars 113 forks source link

ModuleNotFoundError: No module named 'requests' #268

Closed uberubert closed 3 months ago

uberubert commented 3 months ago

Describe the bug

image

Reproduction

What I did:

  1. Followed the quick install instructions for windows, standalone
  2. Found an error with wrong python version. After trying 3 different python versions, it seems like 3.11 works
  3. Found an error with missing visual c++ 14. Struggled for an hour before finally finding a post where someone updated their visual studio for some reason, and that worked for me as well.
  4. Saw that Cuda was not enabled in the diagnostics.py report, so I reinstalled the correct pytorch versions. Now everything is green in the diagnostics.py report.
  5. Currently running start_alltalk.bat produces the error ModuleNotFoundError: No module named 'requests'
  6. Running pip list I can see clearly that requests is installed with version 2.31.0
  7. Yes, I ran start_environment.bat several times

Text/logs Using python diagnostics.py I get no reported errors. Everything is green, loads of free space, free ram, all versions are green, cuda is enabled.

I'm unable to create diagnostics file. All I get is this error (screenshot of the error)

image

Desktop (please complete the following information): AllTalk was updated: Just downloaded it for the first time. No idea. Custom Python environment: no? (Just followed the install instructions, clicking files and watching progress bars) Text-generation-webUI was updated: There's a web ui?

Additional context I'm not a python environment expert. Honestly, the whole environment thing confuse me every time I have to deal with it. Please ask me to provide specifics and I'll give it my best shot.

erew123 commented 3 months ago

Hi @uberubert

Im assuming this is version 1 of AllTalk https://github.com/erew123/alltalk_tts?tab=readme-ov-file#-quick-setup-text-generation-webui--standalone-installation

and not version 2 of AllTalk https://github.com/erew123/alltalk_tts/tree/alltalkbeta?tab=readme-ov-file#new-features-include

Im assuming you used the atsetup.bat as it created the start_alltalk.bat etc. It should automatically create and setup the environment for you. There is a simple explanation of Python environments here https://github.com/erew123/alltalk_tts?tab=readme-ov-file#installation-and-setup-issues which may help you grasp a better understanding, if you wish.

The c++ requirements are mentioned in the quick installation guide https://github.com/erew123/alltalk_tts?tab=readme-ov-file#-quick-setup-text-generation-webui--standalone-installation

image

and that link goes to the help here:

image

Without the visual studio requirements being installed, Python cannot compile/build extensions it downloads. This is a Python requirement on Windows generally, not specifically AllTalk. Python reference this requirement here https://wiki.python.org/moin/WindowsCompilers

Its highly possible that if Visual Studio wasn't updated/installed on your system, the AllTalk installation process half completed and your python environment didnt complete building correctly. As such, this may well explain why "requirements" was not installed/missing and perhaps why the mini Python version may be damaged. In this scenario, it would be recommended to use the atsetup,bat to delete the custom environment and re-set it up.

That aside, I believe there may have been some issues with Python's servers over the last few days as a few people have reported that certain modules have not installed, despite them being requested by installers (across software other than AllTalk, but also AllTalk, which makes me think there is something wrong at Python).

So I would suggest:

1) Make sure you have visual studio installed as indicated. 2) at a command prompt type pip cache purge which will clear out any of the Pythons download cache, ensuring it will download fresh copies of everything. 3) in atsetup.bat delete the custom alltalk environment (follow any onscreen instructions here as you may have to run the command twice). 4) Re-run atsetup.bat and then re run the standard installation. This should hopefully run though fine. There should be nothing else you would need to do after this apart from run alltalk.

Re Text-generation-webUI was updated: There's a web ui? Text-gen-webui is for running AI Large Language models and AllTalk can integrate with it. That aside, AllTalk v2 does have a full Gradio interface as shown here https://github.com/erew123/alltalk_tts/discussions/237 and availability of the BETA is here https://github.com/erew123/alltalk_tts/discussions/245

Hope that covers most things off for you. I am travelling currently, so my ability to test/reply things is currently limited.

Thanks

uberubert commented 3 months ago

Excellently deducted!

Surely enough, after I wiped the alltalk-folder and redid the steps with proper c++ and python and all that.. It works now!

Oh, and one more thing. That was you answer in a "limited" situation?? It's rare to see such a rich and well formed answer! I truly hope others stumble onto this specific issue and find your answer when facing the same problem! Bravo!