我正在尝试使用

pip install Scrapy

但我收到此错误:
    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.

尝试安装依赖项:
sudo apt-get install build-essential libssl-dev libffi-dev python-dev

还是一样的错误。

谁能告诉我我错过了什么?

我在 ubuntu 16.04

最佳答案

我刚刚遇到了类似的错误。我通过引用这个 link 解决了这个问题。
问题是'cffi'有两个不同的版本。你可以通过更新旧版本来确保版本一致。

你可以试试 sudo apt-get install python-cffi

希望它能对您有所帮助。

关于python - 异常 : Version mismatch:cffi,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/43325110/

10-12 22:57