AI4Bharat/IndicXlit

Unable to install `ai4bharat-transliteration` on Windows

rdp1414 opened this issue · 2 comments

Hello Team,

We need the Romanization feature badly. Can someone please help? We want to transliterate (not translate) from Hindi (Devanagiri script) language to English (Roman script) language.

So, I logged a StackOverflow question to know whether Google supports such APIs or not. And someone pointed me to your library saying:

It seems like the PyPI package ai4bharat-transliteration by the researchers at AI4Bharat is a viable non-Google alternative for transliteration from Hindi to romanized text.

When I tried to install ai4bharat-transliteration by running the following commands:

# Ran successfully
> pip install --upgrade numpy
> pip install editdistance
# Error was raised
> pip install ai4bharat-transliteration

but got the following error:

ERROR: Failed building wheel for fairseq
Failed to build fairseq
ERROR: Could not build wheels for fairseq, which is required to install pyproject.toml-based projects

I'm using Python v3.9.11.

What is the cause of the above problem and how to solve it?

Thank You,
Rajdeep

After the above, I installed 2 other Python libraries - wheel and fairseq.

> pip install wheel
> pip install fairseq

Again, upon trying to install pip install ai4bharat-transliteration, the above error is not raised, rather some C++ 14 ... error was raised this time.


Now, how did I fix C++ 14... error? I downloaded Visual Studio Installer and in that installed following:

  1. Install Windows 11 SDK.
  2. Install Visual C++ build tools as the steps mentioned here.

Finally, pip install ai4bharat-transliteration worked!!

@rdp1414
I am not able to install ai4bharat-transliteration
while installing I have faced this issues :

DEPRECATION: omegaconf 2.0.6 has a non-standard dependency specifier PyYAML>=5.1.*. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of omegaconf or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at pypa/pip#12063

I have installed Visual C++ build tools since the issue is not solved