ionelmc / cookiecutter-pylibrary

Enhanced cookiecutter template for Python libraries.
BSD 2-Clause "Simplified" License
1.25k stars 207 forks source link

Travis Version mismatch: cffi package version 1.14.1, located in /tmp/pip-build-env, _cffi_backend extension module version 1.5.2 #203

Closed dHannasch closed 4 years ago

dHannasch commented 4 years ago

The Travis build fails installing python-nameless with

    Exception: Version mismatch: this is the 'cffi' package version 1.14.1, located in '/tmp/pip-build-env-IrZ1TX/overlay/lib/python2.7/site-packages/cffi/api.pyc'.  When we import the top-level '_cffi_backend' extension module, we get version 1.5.2, located in '/usr/lib/python2.7/dist-packages/_cffi_backend.x86_64-linux-gnu.so'.  The two versions should be equal; check your installation.

It only fails for Python 2, not Python 3; that must be significant somehow, but I don't know how.

Some people said this could be fixed by upgrading python-cffi, but I tried that in https://github.com/ionelmc/cookiecutter-pylibrary/pull/202 and it looks like python-cffi isn't installed at all.

In any case, we can work around it by installing an older version of CFFI for Python 2, since the newer version doesn't seem to work with Python 2. See the latest version of https://github.com/ionelmc/cookiecutter-pylibrary/pull/202.