facebookresearch / fastText

Library for fast text representation and classification.
https://fasttext.cc/
MIT License
25.76k stars 4.71k forks source link

AWS - No module named 'fasttext_pybind' #1324

Open lironesamoun opened 1 year ago

lironesamoun commented 1 year ago

Hello,

I try to use fasttext with a lambda function through a layer on AWS. I struggle a lot with the import. When I run the code, I get this error:

{
  "errorMessage": "Unable to import module 'app': No module named 'fasttext_pybind'",
  "errorType": "Runtime.ImportModuleError",
  "requestId": "e80d4afc-3639-4d57-a564-d3898ce43f39",
  "stackTrace": []
}

All the other imported modules worked well, so it's not a problem of links or whatever. It's really about fasttext.

I have an Apple M1 (Ventura 13.1) along with Python 3.9.16 and PIP for packages dependencies. On AWS, it's also Python 3.9. I have installed wheel, fasttext-wheel and pybind11.

I tried as well to build and compiled fasttext on a Docker Ubuntu Image so that I take the installed packaged and put it on AWS. I still have the same error.

I don't know what to do more and I'm stuck.

Any insights ?

Thank a lot

ZJaume commented 1 year ago

FastText now seems to fail with the newest PIP (23.1) with a similar error. Downgrading to 22.1 and lower seems to work. Haven't tried in AWS but maybe it is your problem?

lironesamoun commented 6 months ago

Did not work by downgrading to 22.1 :(