Installation error for 'pip install libretranslate'

Hello, I’ve installed Python 3.10.0 on Windows 10, and executed command ‘pip install libretranslate’, as was mentioned in this instruction: https://github.com/LibreTranslate/LibreTranslate
But I got the following error:

ERROR: Cannot install libretranslate==1.2.3, libretranslate==1.2.4 and libretranslate==1.2.5 because these package versions have conflicting dependencies.

The conflict is caused by:
    libretranslate 1.2.5 depends on pyicu==2.7
    libretranslate 1.2.4 depends on pyicu==2.7
    libretranslate 1.2.3 depends on polyglot==16.7.4

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

How can I fix this issue? Thanks.

P.S. Installation from whl file libretranslate-1.2.5-py3-none-any.whl also did not help, I got more errors:

ERROR: Could not find a version that satisfies the requirement polyglot==16.7.4 (from libretranslate) (from versions: 14.11, 15.3, 15.3.5, 15.3.17, 15.4.19, 15.5.2, 15.10.3, 16.7.4)
ERROR: No matching distribution found for polyglot==16.7.4

You might have to use docker to run LibreTranslate on Windows, as suggested here: https://github.com/LibreTranslate/LibreTranslate/blob/main/README.md#run-with-docker

Hello, thanks for a suggestion, I am looking for a way to make it work with just a python.

It may be possible to run on Windows you’ll just have to figure out getting all the dependencies to work.

It may be possible to run on Windows you’ll just have to figure out getting all the dependencies to work.

Shouldn’t it get all the dependencies itself, when I execute the ‘pip install libretranslate’ command?

It will attempt to pull all the Python dependencies but that doesn’t necessarily mean it can run on any platform. For example, CTranslate2 is only compiled for Linux and Mac.

2 Likes