How to install scikit-learn on heroku cedar?

前端 未结 5 1943
孤城傲影
孤城傲影 2021-01-13 00:23

I\'v successfully installed numpy and scipy using the method described in this answer. Then I wanted to add scikit-learn so at first I tried adding scikit-learn==0.11<

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-13 00:31

    You might be able to package all of the libraries you require in the application itself, but the more elegant solution is to clone the Heroku Python Buildpack on git, and modify it to include the libraries. Then you can instruct your app to use your modified buildpack with the --buildpack flag on the command-line client.

    Edit: I didn't click through to the other answer originally, but it sounds like you're already using a custom buildpack. The buildpack you're using has a variety of custom steps which download custom binaries. The binaries are compiled under 64-bit Debian.

    You should be able to dissect one of the other custom binaries the buildpack is using to find out the --prefix with which you can ./configure and build the extra libraries you want. It's not exactly easy or convenient, but it should work the same as numpy and scipy worked.

提交回复
热议问题