Closed alexlnkp closed 10 months ago
pip install -e .
instead of python setup.py install
I was getting the same issue while trying to make it work inside a docker container. After investigating it for a while I realized the issue was due to me using python3 -m pip install
instead of python3 -m pip install -e .
The problem is that this line:
STATIC_DIR = Path(__file__).parent.parent.parent/'static'
uses __file__
attribute that stores the "pathname of the file from which the module was loaded". When you run setup.py install
all your .py
files get copied to D:\live-translate-master\env\lib\site-packages
but the static
folder that is referenced in vocoder.py
does not. In this case you need to run pip install -e .
instead of python setup.py install
. This way nothing gets copied to your site-packages but a path to your project is added to python's environment variables. It looks kinda dirty but it should just work.
TLDR: just use
pip install -e .
instead ofpython setup.py install
I was getting the same issue while trying to make it work inside a docker container. After investigating it for a while I realized the issue was due to me using
python3 -m pip install
instead ofpython3 -m pip install -e .
The problem is that this line:STATIC_DIR = Path(__file__).parent.parent.parent/'static'
uses__file__
attribute that stores the "pathname of the file from which the module was loaded". When you runsetup.py install
all your.py
files get copied toD:\live-translate-master\env\lib\site-packages
but thestatic
folder that is referenced invocoder.py
does not. In this case you need to runpip install -e .
instead ofpython setup.py install
. This way nothing gets copied to your site-packages but a path to your project is added to python's environment variables. It looks kinda dirty but it should just work.
Ohhh, i see! Thanks a lot dude :)
Hello! Allow me to reopen this thread, as I am completely over my head right now ^^I am trying to run a fine tuned model, so here is the command I used:
python tortoise_tts.py --text="Hey there" --voice="voice2" --preset="fast" --candidates=3 --ar-checkpoint="/home/me/AI_Projects/tortoise-tts-fix/tortoise/custom_models/autoregressive.pth"
However when I do that, I have this same error :
from pathlib import Path │
│ 405 STATIC_DIR = Path(__file__).parent.parent.parent/'static' │
│ ❱ 406 assert STATIC_DIR.is_dir() │
│ 407 def BVGWithConf(fname: str): │
│ 408 │ json_config = json.loads( │
│ 409 │ │ (STATIC_DIR/fname).read_text()
I tried to do as you said earlier, that is to say launch pip install -e, but I still have the same error...
I'm very new to machine learning so sorry if I ask obvious questions, I'm kind of struggling a lot lol
Did you remove the old package first and did it actually install successfully when you used pip install -e
? Make sure to remove the old installation before running the above command:
pip uninstall tortoise
pip install -e
Not sure why it didn't work for you but I think installing everything from scratch should help.
Hello ! Thank you for your answer ! Yeah I ended up reinstalling everything and it finally worked, thank you 😊😊
when i run tortoise-tts.py with CLI:
(env) D:\live-translate-master\tortoise-tts-fast>python ./scripts/tortoise_tts.py --preset ultra_fast --voice emma --seed 42 --text "test"
i get this assertion:
i did setup.py install and pip install -r requirements.txt i also use a virtual environment, python ver is 3.10.11