Chamnap
Chamnap

Reputation: 4766

Install pip module from a rails app on heroku

I have an rails app deployed on heroku. This app depends on one python module, https://github.com/clips/pattern. Based on documentation of pattern, I could install by two ways:

1: cd pattern-2.5; python setup.py install

creating /usr/local/lib/python2.7/site-packages/pattern error: could not create '/usr/local/lib/python2.7/site-packages/pattern': Read-only file system

2: pip install pattern

bash: pip: command not found

Please, advise me how to install pattern. I found a similar question, How to install python module on Heroku cedar stack with Rails, but it just doesn't work for me.

Upvotes: 1

Views: 2047

Answers (1)

CraigKerstiens
CraigKerstiens

Reputation: 5979

Buildpacks are the mechanism Heroku uses to build your application including installing dependencies. Pip is not installed by default, the Python buildpack itself pulls this dependency in. You could use the multi-buildpack which allows you to include several buildpacks.

Multi buildpack - https://github.com/ddollar/heroku-buildpack-multi

Python buildpack - https://github.com/heroku/heroku-buildpack-python

Ruby buildpack - https://github.com/heroku/heroku-buildpack-ruby

Upvotes: 7

Related Questions