unable to use TfidfVectorizer in Google app engine

后端 未结 2 558
无人共我
无人共我 2021-01-23 03:48

I am writing a python program in Google App Engine that calculates tf-idf using TfidfVectorizer in sklearn.

I have added sklearn library and have the import as:

<
相关标签:
2条回答
  • 2021-01-23 04:20

    You can't. sklearn has a lot of 'c' based dependencies and typically any module that is named with a leading _ is a binary module.

    So that's why you are getting a no module named _check_build error.

    I seriously doubt you will get it to run even if you fake some of the 'c' libs unless they have pure python analogues.

    I have done this in the past where libs had 'c' based performance versions as well as pure python.

    0 讨论(0)
  • 2021-01-23 04:38

    if you are not using any of GAE-specific tools, try deploying your app on Heroku. It let's you deploy a whole virtual environment with all the installed libraries on it. Specifically, Scikit-learn works on Heroku just fine. Check this Github repo for example.

    0 讨论(0)
提交回复
热议问题