AI4Bharat / IndicXlit

Transliteration models for 21 Indic languages
https://ai4bharat.iitm.ac.in/transliteration
MIT License
67 stars 16 forks source link

Unable to install `ai4bharat-transliteration` on Windows #21

Open rdp1414 opened 1 year ago

rdp1414 commented 1 year ago

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

rdp1414 commented 1 year ago

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!!

BokadeVijay26 commented 4 months ago

@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 https://github.com/pypa/pip/issues/12063

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