when i start uwsgi 2.0.11.2 under pyenv 2.7.11 i get:
ImportError: /home/user/.pyenv/versions/2.7.11/envs/master2/lib/python2.7/lib-dynload/_io.so: undefined symbol: _PyCodecInfo_GetIncrementalEncoder
also uwsgi prints Python version: 2.7.10 (default, May 30 2015, 13:57:08) [GCC 4.8.2]
not sure how to fix it
I had the same (or better: a similar) problem with uwsgi when upgrading Python from 2.7.3 to 2.7.10:
_PyInt_AsInt
The problem is a mismatch between some functions between Python minor minor releases (which doesn't break any backward compatibility, BTW). Let me detail:
Build time: when your uwsgi was built, the build was against Python 2.7.10 (as you specified). Python could have been compiled/built:
Run time: the above uwsgi must run in an Python 2.7.11 environment
Regardless of how Python is compiled, the following thing happened: between 2.7.10 and 2.7.11 some internal functions were added/removed (in our case added) from both:
So, basically it's a version mismatch (encountered at runtime):
2.7.10 (which uwsgi was compiled against):
PyCodecInfo_GetIncrementalEncoder
2.7.11 (which uwsgi is run against):
PyCodecInfo_GetIncrementalEncoder
resulting a situation where a Python 2.7.11 dynamic module was used against Python 2.7.10 runtime, which is unsupported.
As a conclusion make sure that your uwsgi buildmachine is in sync (from Python PoV) with the runmachine, or - in other words - build uwsgi with the same Python version you intend to run it with!