简体   繁体   中英

SciPy on Heroku with Conda failing to deploy

My setup:

  1. Heroku
  2. Python 2.7.6
  3. Django 1.8

I have the Conda Buildpack set as per:

https://devcenter.heroku.com/articles/python-c-deps

Here's my conda-requirements:

$ cat conda-requirements.txt 
cryptography
scipy
numpy
gcc
libffi

Here's the error I'm seeing after trying to git push:

remote:            gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/app/.heroku/miniconda/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7/c/_cffi_backend.o
remote:            c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
remote:             #include <ffi.h>
remote:                             ^
remote:            compilation terminated.
remote:            error: command 'gcc' failed with exit status 1

This is fairly confusing because I have libffi in my conda-requirements already and yet it's the same one that's failing. Googling reveals that some other folks have this same error still - while others don't. Any thoughts/suggestions appreciated!

On the ticket I opened for this issue, this was suggested :

You need to install the libffi-dev (or your OS's equivalent) system package; on debian/ubuntu, that would be apt-get install libffi-dev , for example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM