Heroku / Django error installing pylibmc

I get a long list of errors when trying to deploy to Heroka. I followed their guidance to get started, but apparently this is not enough and inaccurate.

My settings is a module, and my requirements is a folder consisting of different .txt files for each environment:

settings/ base.py dev.py heroku.py requirements/ base.txt dev.txt heroku.txt 

I tried installing in Heroku with pylibmc==1.2.2 django-pylibmc-sasl==0.2.4 in base.txt and in the heroku.txt file (which extends base.txt) and still the same.

Error tracking (small sample):

 _pylibmcmodule.c:2097: warning: passing argument 1 of 'PyInt_FromLong' makes integer from pointer without a cast /app/.heroku/python/include/python2.7/intobject.h:38: note: expected 'long int' but argument is of type 'struct PylibMC_Behavior *' _pylibmcmodule.c:2097: warning: passing argument 1 of 'PyObject_SetAttrString' from incompatible pointer type /app/.heroku/python/include/python2.7/object.h:472: note: expected 'struct PyObject *' but argument is of type 'struct PylibMC_Behavior *' _pylibmcmodule.c:2098: error: 'PylibMC_McErr' has no member named 'name' _pylibmcmodule.c:2098: error: 'PylibMC_McErr' has no member named 'exc' _pylibmcmodule.c:2098: warning: passing argument 2 of 'PyModule_AddObject' from incompatible pointer type /app/.heroku/python/include/python2.7/modsupport.h:40: note: expected 'const char *' but argument is of type 'struct PylibMC_Behavior *' _pylibmcmodule.c:2100: error: 'PylibMC_McErr' has no member named 'name' _pylibmcmodule.c:2100: error: 'PylibMC_McErr' has no member named 'exc' _pylibmcmodule.c: In function 'init_pylibmc': _pylibmcmodule.c:2176: error: 'LIBMEMCACHED_VERSION_STRING' undeclared (first use in this function) _pylibmcmodule.c:2176: warning: passing argument 3 of 'PyModule_AddStringConstant' from incompatible pointer type /app/.heroku/python/include/python2.7/modsupport.h:42: note: expected 'const char *' but argument is of type 'struct PylibMC_Behavior *' error: command 'gcc' failed with exit status 1 ---------------------------------------- Command /app/.heroku/python/bin/python -c "import setuptools;__file__='/app/build/pylibmc/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-i0GDaz-record/install-record.txt failed with error code 1 in /app/build/pylibmc Storing complete log in /app/.pip/pip.log ! Heroku push rejected, failed to compile Python app 

I found this related post, which gave an idea of โ€‹โ€‹trying to add libs to base.txt, but still didn't help.

+4
source share
1 answer

Pylibmc is automatically supported if it is present in the requirements file.

Having all of these requirement files is an extra overhead. Check out the Twelve Factors of Dev / Prod Parity .

+2
source

All Articles