我有一個Django應用程序使用zbar進行條形碼識別。 它的工作原理我的開發機器上很好,但是當我試圖將其部署到Heroku的我提交與下面的郵件被拒絕:heroku無法安裝zbar
Installing collected packages: zbar
Running setup.py install for zbar
building 'zbar' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app/.heroku/python/include/python2.7 -c zbarmodule.c -o build/temp.linux-x86_64-2.7/zbarmodule.o
In file included from zbarmodule.c:24:
zbarmodule.h:26:18: error: zbar.h: No such file or directory
In file included from zbarmodule.c:24:
/*many "undeclared" errors*/
! Push rejected, failed to compile Python app
pip install zbar
我的電腦上正常工作。 而我填寫requirements.txt
cat requirements.txt
Django==1.5.5
PIL==1.1.7
dj-database-url==0.2.2
dj-static==0.0.5
django-toolbelt==0.0.1
gunicorn==18.0
psycopg2==2.5.1
static==0.4
wsgiref==0.1.2
zbar==0.10
任何人都可以幫助我嗎? PS抱歉我寫錯了。英語不是我的母語。
我從來沒有用過的Heroku,但您使用的virtualenv?您可能沒有權限編譯全球網站包的東西。編輯:你有'建立必要的'安裝? – Enrico
@Enrico是的,我使用virtualenv。 「我的開發人員機器上安裝了必要的」嗎? –