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

Encountered error while trying to install fasttext #89

Open
cw-rtm opened this issue Apr 3, 2023 · 2 comments
Open

Encountered error while trying to install fasttext #89

cw-rtm opened this issue Apr 3, 2023 · 2 comments

Comments

@cw-rtm
Copy link

cw-rtm commented Apr 3, 2023

anyone has idea how to fix this?
i am using a new profile on company's laptop, the old profile had no issue when installing
image

@RwGrid
Copy link

RwGrid commented Jun 2, 2023

use linux and still you need build-essential-12.9, install it as .deb package
if windows ,use python 3.8 or 3.9 with :
don't install the normal way , do this instead in conda
pip install --no-deps easynmt
pip install langdetect
pip install nltk

@Sirozha1337
Copy link

In case anyone still looking for a solution. The problem is in the fastText package which doesn't have pre-built binaries for Python 3.10 and later. So it requires a rebuild from source, which requires the correct version of gcc compiler, which in this case is 12.

You can check which version of gcc you have by running this command:
gcc --version

If it's 13, 14 or whatever, then you need to the following:

  1. You need to install previous gcc and g++ version using this command:
    apt install gcc-12 g++-12

  2. Then you need to set this version as default one:
    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 1

  3. Then install the fasttext package:
    pip install fasttext

  4. Then you can finally install the EasyNMT

To revert back, use these commands:

  1. Revert the default version back using this command:
    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 1

  2. Remove unneeded compiler:
    apt remove gcc-12 g++-12

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

3 participants