I have python2.6 in my Linux rhel-5. I have installed pip and required CFFI packages. When i try to run a sample CFFI program it says :
ffi = FFI()
File "/usr/lib/python2.6/site-packages/cffi/api.py", line 56, in init
import _cffi_backend as backend
ImportError: No module named _cffi_backend
what could be the posiible error. Did i miss something during install. i have installed pip, wheel, pycparser, pytest, cffi....
You could look at the code L56 in
/usr/lib/python2.6/site-packages/cffi/api.py
It needs the
_cffi_backend.so
in your pythonpath. You could install the python-cffi for it. But not sure whether it is in your RPM repo, especially you are using RHEL-5. Here is an RPM for CENTOShttp://cbs.centos.org/koji/rpminfo?rpmID=20613
Hope it helps. I am still searching the source code for building the_cffi_backend.so
.Have the same problem. After many attempts adding import cffi solve the issue.
Make sure you have cffi and cryptography installed.
You have to first remove the following packages:
Now use the following command to install:
For python2.x use following command:
for python3.x
I recently had the same issue and none of the above solutions worked for me.
Here is what worked.
You should do install cffi
pip install cffi
to get the latest version. I had to restart my application for it to recognize the cffi installation.