Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception: Version mismatch:cffi

I'm trying to install scrapy using

pip install Scrapy

But I'm getting this error:

    Exception: Version mismatch: this is the 'cffi' package version 1.10.0, located in '/usr/local/lib/python2.7/dist-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.

Tried installing the dependencies:

sudo apt-get install build-essential libssl-dev libffi-dev python-dev

Still the same error.

can anyone tell me what I'm missing ?

I'm on ubuntu 16.04

like image 311
Rahul Avatar asked Dec 11 '22 12:12

Rahul


1 Answers

I have just encountered a similar mistake. I solved this problem by referring to this link. The problem is that there are two different versions of 'cffi'.You can make sure the version is consistent by updating the old version.

You can try sudo apt-get install python-cffi.

Hope it can help you.

like image 130
dxf Avatar answered Dec 13 '22 02:12

dxf