ModuleNotFoundError: No module named 'tortoise' #256

Open
opened 2023-06-07 08:32:53 +00:00 by confuscious · 21 comments

My steps leading up to this error:

  • download git and python
  • install both, had issues with python because didn't know I had to do something with PATH
  • start "setup-cuda.bat" since I have Nvidia graphics card
  • clicked "start.bat"
  • error in console

I have no idea what to do, I believe I followed all the steps correctly, then again, I have not the slightest clue about anything coding or computer related. If any more info is needed, I can try and give it to the best of my ability.

My steps leading up to this error: - download git and python - install both, had issues with python because didn't know I had to do something with PATH - start "setup-cuda.bat" since I have Nvidia graphics card - clicked "start.bat" - error in console I have no idea what to do, I believe I followed all the steps correctly, then again, I have not the slightest clue about anything coding or computer related. If any more info is needed, I can try and give it to the best of my ability.
Author

More code from command prompt just incase it is necessary.

C:\Users\Topha\Music\ai\Tortoise TTS\ai-voice-cloning>call .\venv\Scripts\activate.bat
Traceback (most recent call last):
File "C:\Users\Topha\Music\ai\Tortoise TTS\ai-voice-cloning\src\main.py", line 11, in
from utils import *
File "C:\Users\Topha\Music\ai\Tortoise TTS\ai-voice-cloning\src\utils.py", line 40, in
from tortoise.api import TextToSpeech as TorToise_TTS, MODELS, get_model_path, pad_or_truncate
ModuleNotFoundError: No module named 'tortoise'
Press any key to continue . . .

More code from command prompt just incase it is necessary. C:\Users\Topha\Music\ai\Tortoise TTS\ai-voice-cloning>call .\venv\Scripts\activate.bat Traceback (most recent call last): File "C:\Users\Topha\Music\ai\Tortoise TTS\ai-voice-cloning\src\main.py", line 11, in <module> from utils import * File "C:\Users\Topha\Music\ai\Tortoise TTS\ai-voice-cloning\src\utils.py", line 40, in <module> from tortoise.api import TextToSpeech as TorToise_TTS, MODELS, get_model_path, pad_or_truncate ModuleNotFoundError: No module named 'tortoise' Press any key to continue . . .

Try git submodule update --remote

Try `git submodule update --remote`
Author

Try git submodule update --remote

I got another error:

fatal: not a git repository (or any of the parent directories): .git

I just opened the command prompt and entered that in so maybe I did it wrong, but I would not know cus I know nothing about coding.

> Try `git submodule update --remote` I got another error: fatal: not a git repository (or any of the parent directories): .git I just opened the command prompt and entered that in so maybe I did it wrong, but I would not know cus I know nothing about coding.
Author

I tried "update.bat" then tried "start.bat" again, only to get the exact same error. DX

I tried "update.bat" then tried "start.bat" again, only to get the exact same error. DX

You'd need to do it in the directory where you cloned the repo, preferably after activating the venv.

You'd need to do it in the directory where you cloned the repo, preferably after activating the venv.
Author

You'd need to do it in the directory where you cloned the repo, preferably after activating the venv.

The directory? Cloned the repo? After activating the venv? Uhhhhh.... I dont remember cloning anything. And idk what a venv is, sorry. I only followed the simple instructions for this, and even then, I struggled. Consider me a complete beginner when it comes to this stuff lol.

> You'd need to do it in the directory where you cloned the repo, preferably after activating the venv. The directory? Cloned the repo? After activating the venv? Uhhhhh.... I dont remember cloning anything. And idk what a venv is, sorry. I only followed the simple instructions for this, and even then, I struggled. Consider me a complete beginner when it comes to this stuff lol.

You did git clone https://git.ecker.tech/mrq/ai-voice-cloning right? Go into the directory "ai-voice-cloning" (unless you named it something else), and run .\venv\scripts\Activate. Then git submodule update --remote like this:

image

You did `git clone https://git.ecker.tech/mrq/ai-voice-cloning` right? Go into the directory "ai-voice-cloning" (unless you named it something else), and run `.\venv\scripts\Activate`. Then `git submodule update --remote` like this: ![image](/attachments/3d5bb636-3f22-46f6-a12e-131adb088411)
Author

You did git clone https://git.ecker.tech/mrq/ai-voice-cloning right? Go into the directory "ai-voice-cloning" (unless you named it something else), and run .\venv\scripts\Activate. Then git submodule update --remote like this:

image

I don't really understand what that image even is trying to convey to be honest with you, so I just went to the "ai-voice-cloning" directory (which I just found out is another word for folder, did not even know that), typed "cmd" in the file path (coincidently learned that small trick from a youtube video I stumbled upon), then copy and pasted ".\venv\scripts\Activate" then "git submodule update --remote". The result? The exact same error from the beginning. So I must've done something wrong.

> You did `git clone https://git.ecker.tech/mrq/ai-voice-cloning` right? Go into the directory "ai-voice-cloning" (unless you named it something else), and run `.\venv\scripts\Activate`. Then `git submodule update --remote` like this: > > ![image](/attachments/3d5bb636-3f22-46f6-a12e-131adb088411) I don't really understand what that image even is trying to convey to be honest with you, so I just went to the "ai-voice-cloning" directory (which I just found out is another word for folder, did not even know that), typed "cmd" in the file path (coincidently learned that small trick from a youtube video I stumbled upon), then copy and pasted "`.\venv\scripts\Activate`" then "`git submodule update --remote`". The result? The exact same error from the beginning. So I must've done something wrong.
Author

I tried doing whatever you did on powershell because maybe that was making a difference, only to have even more problems lmao. Isn't there just a youtube video out there for installing this? I feel like im over complicating it.

I tried doing whatever you did on powershell because maybe that was making a difference, only to have even more problems lmao. Isn't there just a youtube video out there for installing this? I feel like im over complicating it.

You're launching PS and then running cmd.exe in it? Why? Also you forgot the cd in front of the directory name.

You're launching PS and then running cmd.exe in it? Why? Also you forgot the `cd` in front of the directory name.
Author

You're launching PS and then running cmd.exe in it? Why? Also you forgot the cd in front of the directory name.

Oh yea sorry bout that cmd.exe thing at the beginning, forgot to mention those were failed attempts at trying to put the path of the directory of the ai voice thingy. Hope that didn't affect anything. Well, I tried typing "cd" in front of the directory name but uhh yea. I fucked it up again ffs. God damn im so sorry for being a dunce. Nothing is happening after I type those commands in.

> You're launching PS and then running cmd.exe in it? Why? Also you forgot the `cd` in front of the directory name. Oh yea sorry bout that cmd.exe thing at the beginning, forgot to mention those were failed attempts at trying to put the path of the directory of the ai voice thingy. Hope that didn't affect anything. Well, I tried typing "cd" in front of the directory name but uhh yea. I fucked it up again ffs. God damn im so sorry for being a dunce. Nothing is happening after I type those commands in.

Hmm, that should have worked. Try running setup-cuda.bat again (inside the venv) then update-force.bat, then start.bat, if that doesn't work delete the directory and re-clone.

Hmm, that should have worked. Try running `setup-cuda.bat` again (inside the venv) then `update-force.bat`, then `start.bat`, if that doesn't work delete the directory and re-clone.
Author

Hmm, that should have worked. Try running setup-cuda.bat again (inside the venv) then update-force.bat, then start.bat, if that doesn't work delete the directory and re-clone.

How do I run setup-cuda.bat inside venv? I dont know what venv is. I'll try messing around for now until you respond but im not really certain on what you mean by run inside the venv, and how I would run setup-cuda.bat in it.

> Hmm, that should have worked. Try running `setup-cuda.bat` again (inside the venv) then `update-force.bat`, then `start.bat`, if that doesn't work delete the directory and re-clone. How do I run `setup-cuda.bat` inside venv? I dont know what venv is. I'll try messing around for now until you respond but im not really certain on what you mean by run inside the venv, and how I would run `setup-cuda.bat` in it.

From the looks of it, it looks like your missing the tortoise module, which I think it would just be easier to just redownload everything from scratch as suggested above.

I would just do the following:

Navigate to a folder in the file explorer, hold shift and right click, then click on the "Open Powershell Window Here" option. This will open powershell in that directory. Then run the following in order:

git clone https://git.ecker.tech/mrq/ai-voice-cloning
cd .\ai-voice-cloning\
.\setup-cuda.bat
From the looks of it, it looks like your missing the tortoise module, which I think it would just be easier to just redownload everything from scratch as suggested above. I would just do the following: Navigate to a folder in the file explorer, hold shift and right click, then click on the "Open Powershell Window Here" option. This will open powershell in that directory. Then run the following in order: ``` git clone https://git.ecker.tech/mrq/ai-voice-cloning cd .\ai-voice-cloning\ .\setup-cuda.bat ```

I dont know what venv is.

It's the Virtual ENVironment. It's what you activate when you run .\venv\Scripts\activate. You can tell because it appends (venv) to the beginning of your prompts.

> I dont know what venv is. It's the Virtual ENVironment. It's what you activate when you run ` .\venv\Scripts\activate`. You can tell because it appends `(venv)` to the beginning of your prompts.
Author

From the looks of it, it looks like your missing the tortoise module, which I think it would just be easier to just redownload everything from scratch as suggested above.

I would just do the following:

Navigate to a folder in the file explorer, hold shift and right click, then click on the "Open Powershell Window Here" option. This will open powershell in that directory. Then run the following in order:

git clone https://git.ecker.tech/mrq/ai-voice-cloning
cd .\ai-voice-cloning\
.\setup-cuda.bat

Okay, I did what you recommended and deleted the ai voice folder then just re-extracted the zip file again to start fresh. After a while I got to this screen, but I do not know if I should do F or D, this could have possibly been what I messed up on the last time, maybe I choose the wrong one?

> From the looks of it, it looks like your missing the tortoise module, which I think it would just be easier to just redownload everything from scratch as suggested above. > > I would just do the following: > > Navigate to a folder in the file explorer, hold shift and right click, then click on the "Open Powershell Window Here" option. This will open powershell in that directory. Then run the following in order: > > ``` > git clone https://git.ecker.tech/mrq/ai-voice-cloning > cd .\ai-voice-cloning\ > .\setup-cuda.bat > ``` Okay, I did what you recommended and deleted the ai voice folder then just re-extracted the zip file again to start fresh. After a while I got to this screen, but I do not know if I should do F or D, this could have possibly been what I messed up on the last time, maybe I choose the wrong one?

I never got that screen when trying to set-up, but I would assume directory in this case.

I never got that screen when trying to set-up, but I would assume directory in this case.
Author

Welp, nothing I did worked. I followed a youtubers guide, didnt work. Guess im just cursed with stupidity or something.

Welp, nothing I did worked. I followed a youtubers guide, didnt work. Guess im just cursed with stupidity or something.
Author

Okay, I somehow figured it out. Idk how, but I managed to make something work by just doing all the steps over and over again and going insane in the process. Huge thanks to https://www.youtube.com/@Jarods_Journey for helping me out a lot though, couldn't have done it without him.

Okay, I somehow figured it out. Idk how, but I managed to make something work by just doing all the steps over and over again and going insane in the process. Huge thanks to https://www.youtube.com/@Jarods_Journey for helping me out a lot though, couldn't have done it without him.

The issue is because your Python version is too new, and one of the depencies errors upon installing if you scroll up.

To fix:

  • Install pyenv
  • pyenv install 3.9.17
  • pyenv virtualenv 3.9.17 tts
  • pyenv activate tts

Now go into the folder you cloned:

  • Linux: ./setup-cuda.sh Windows: setup-cuda.bat
  • Linux: ./start.sh Windows: start.bat

No more missing tortoise or tortoise.api, as we made it use 3.9.17 instead of the version of Python you have installed.

The issue is because your Python version is too new, and one of the depencies errors upon installing if you scroll up. To fix: - Install pyenv - pyenv install 3.9.17 - pyenv virtualenv 3.9.17 tts - pyenv activate tts Now go into the folder you cloned: - Linux: ./setup-cuda.sh Windows: setup-cuda.bat - Linux: ./start.sh Windows: start.bat No more missing tortoise or tortoise.api, as we made it use 3.9.17 instead of the version of Python you have installed.

I tried it, python is 3.9.17, and still this error.... how I can solve that

I tried it, python is 3.9.17, and still this error.... how I can solve that
Sign in to join this conversation.
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrq/ai-voice-cloning#256
No description provided.