Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version conflict installing requirements_standalone.txt #396

Closed
SoftologyPro opened this issue Nov 4, 2024 · 4 comments
Closed

Version conflict installing requirements_standalone.txt #396

SoftologyPro opened this issue Nov 4, 2024 · 4 comments

Comments

@SoftologyPro
Copy link

pip install -r system\requirements\requirements_standalone.txt

runs fine for a while then ends with

Collecting zipp==3.18.1 (from -r system\requirements\requirements_standalone.txt (line 172))
  Downloading zipp-3.18.1-py3-none-any.whl.metadata (3.5 kB)
Collecting async-timeout<5.0,>=4.0 (from aiohttp==3.9.3->-r system\requirements\requirements_standalone.txt (line 3))
  Downloading async_timeout-4.0.3-py3-none-any.whl.metadata (4.2 kB)
Collecting exceptiongroup>=1.0.2 (from anyio==4.3.0->-r system\requirements\requirements_standalone.txt (line 8))
  Downloading exceptiongroup-1.2.2-py3-none-any.whl.metadata (6.6 kB)
Requirement already satisfied: setuptools in d:\tests\alltalk tts\alltalk_tts\venv\lib\site-packages (from ctranslate2==4.1.0->-r system\requirements\requirements_standalone.txt (line 29)) (65.5.0)
INFO: pip is looking at multiple versions of tts to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r system\requirements\requirements_standalone.txt (line 102), -r system\requirements\requirements_standalone.txt (line 129), -r system\requirements\requirements_standalone.txt (line 130), -r system\requirements\requirements_standalone.txt (line 137), -r system\requirements\requirements_standalone.txt (line 138), -r system\requirements\requirements_standalone.txt (line 146), -r system\requirements\requirements_standalone.txt (line 148), -r system\requirements\requirements_standalone.txt (line 15), -r system\requirements\requirements_standalone.txt (line 156), -r system\requirements\requirements_standalone.txt (line 157), -r system\requirements\requirements_standalone.txt (line 27), -r system\requirements\requirements_standalone.txt (line 29), -r system\requirements\requirements_standalone.txt (line 38), -r system\requirements\requirements_standalone.txt (line 5), -r system\requirements\requirements_standalone.txt (line 51), -r system\requirements\requirements_standalone.txt (line 54), -r system\requirements\requirements_standalone.txt (line 82), -r system\requirements\requirements_standalone.txt (line 86), -r system\requirements\requirements_standalone.txt (line 95), -r system\requirements\requirements_standalone.txt (line 99) and numpy==1.26.4 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested numpy==1.26.4
    altair 5.2.0 depends on numpy
    blis 0.7.11 depends on numpy>=1.19.0; python_version >= "3.9"
    contourpy 1.2.0 depends on numpy<2.0 and >=1.20
    ctranslate2 4.1.0 depends on numpy
    encodec 0.1.1 depends on numpy
    gradio 3.50.2 depends on numpy~=1.0
    gruut 2.2.3 depends on numpy<2.0.0 and >=1.19.0
    librosa 0.10.1 depends on numpy!=1.22.0, !=1.22.1, !=1.22.2 and >=1.20.3
    matplotlib 3.8.3 depends on numpy<2 and >=1.21
    numba 0.59.1 depends on numpy<1.27 and >=1.22
    onnxruntime 1.17.1 depends on numpy>=1.21.6
    pandas 1.5.3 depends on numpy>=1.21.0; python_version >= "3.10"
    scikit-learn 1.4.1.post1 depends on numpy<2.0 and >=1.19.5
    scipy 1.12.0 depends on numpy<1.29.0 and >=1.22.4
    soxr 0.3.7 depends on numpy
    spacy 3.7.4 depends on numpy>=1.19.0; python_version >= "3.9"
    tensorboard 2.16.2 depends on numpy>=1.12.0
    thinc 8.2.3 depends on numpy>=1.19.0; python_version >= "3.9"
    transformers 4.39.1 depends on numpy>=1.17
    tts 0.22.0 depends on numpy==1.22.0; python_version <= "3.10"

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
@erew123
Copy link
Owner

erew123 commented Nov 4, 2024

@SoftologyPro I see you are installing this on your own VENV? Currently AllTalk is only validated for Python 3.11.x with PyTorch 2.2.x that has CUDA 12.1 installed.

What versions of those things are you using? As it may well be that if you are using later versions of PyTorch, that is the issue here.

Ctranslate2 was updated very recently, which broke compatibility with PyTorch 2.2.x, however as AllTalk's install routine was based on 2.2.x and I do not have time to go update all the base requirements in one single go (Please see my statement here as to why), the easiest solution for me was to lock Ctranslate2 to version 4.4.0 which is compatible.

See here for the recent issues with the update to Ctranslate2 and compatibility OpenNMT/CTranslate2#1806

If you are using other versions of PyTorch, you are welcome to remove the version specifier in the requirements file system\requirements\requirements_standalone.txt for Ctranslate2 (as in remove the ==4.4.0 against ctranslate2) but I cannot say if there will be other compatibility issues. Its just not something I have had time to work on to that level or look into. Removing the specifier will allow it to install Ctranslate2 4.5.0 which is compatible with later versions of PyTorch & CUDA versions.

FYI you will need to build your own DeepSpeed wheel for later versions of PyTorch too, if you want to use DeepSpeed. I recently built a tool for doing that, along with detailed explanations/instructions https://github.com/erew123/deepspeedpatcher and an explanation as to why you would need to build a new version is here https://github.com/erew123/deepspeedpatcher?tab=readme-ov-file#important-version-compatibility-information

Obviously, that aside, using the atsetup.bat method that will build a custom conda environment with the correct requirements/setup works fine (as below).

image

image

Thanks

@erew123
Copy link
Owner

erew123 commented Nov 4, 2024

@SoftologyPro Oh BTW there was also a code correction in the last 20 minutes, so you may want to git pull an update, to update tts_server.py otherwise it may error on start-up.

Thanks

@SoftologyPro
Copy link
Author

OK, thank you. Using atsetup.bat in a directory without spaces works fine.

@erew123
Copy link
Owner

erew123 commented Nov 5, 2024

@SoftologyPro Thanks ill close the ticket. FYI, Just added the F5-TTS engine, so you can git pull again if you wish to get the update.

Thanks

@erew123 erew123 closed this as completed Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants