Heroku: sh: cython: not found Heroku: sh: cython: not found heroku heroku

Heroku: sh: cython: not found


From the Heroku FAQ...

Can I require modules with C extensions?

Yes. If the module will install properly with pip. Most libraries that are required for web applications are available at build time.

However, sometimes a shared library needed for a module isn’t available. If this becomes a problem for you, you should contact support@heroku.com for help.

...so you'll probably have to e-mail them to get gevent and/or cython support.


I needed to deploy to heroku a custom branch of gevent (with fixes to compatibility with CPython 2.7.9 for TLS client) that requires cython to build.My requirements.txt included, among other things:

Cython==0.22-e git+https://github.com/zeevt/gevent.git@issue477#egg=geventgrequests==0.2.0gunicorn==19.3.0requests==2.6.0

I got a sh: cython: not found trying to build gevent.

The way to deploy this to Heroku is by using two commits:

  1. First deploy an app that uses Cython but does not use a custom version of gevent. This will cause Cython to be installed.
  2. Then deploy the working version of the app that uses a custom branch of gevent. This will build fine because Cython is already installed.