Python3 Ctypes Backend Version Mismatch on Ubuntu 16.04
See original GitHub issueI want pysoundfile to work correctly on Python3 so badly, but for the life of me I can’t figure out a workaround for this.
In [1]: import soundfile
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-1-aaba2ade8dee> in <module>()
----> 1 import soundfile
/usr/local/lib/python3.5/dist-packages/soundfile.py in <module>()
21 _unicode = str
22
---> 23 _ffi = _FFI()
24 _ffi.cdef("""
25 enum
/usr/local/lib/python3.5/dist-packages/cffi/api.py in __init__(self, backend)
57 from . import __version__
58 assert backend.__version__ == __version__, \
---> 59 "version mismatch, %s != %s" % (backend.__version__, __version__)
60 # (If you insist you can also try to pass the option
61 # 'backend=backend_ctypes.CTypesBackend()', but don't
AssertionError: version mismatch, 1.5.2 != 1.9.1
My cffi.__version__
is '1.9.1'
, and I have no idea how to change the backend. This may not strictly be a pysoundfile issue, but this is the only place where I encounter this problem and I’ve given up trying to fix it so many times…
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Python3 Ctypes Backend Version Mismatch on Ubuntu 16.04
I want pysoundfile to work correctly on Python3 so badly, but for the life of me I can't figure out a workaround for...
Read more >Exception: Version mismatch:cffi - python - Stack Overflow
The problem is that there are two different versions of 'cffi'.You can make sure the version is consistent by updating the old version....
Read more >Changelog — Python 3.11.1 documentation
Patch by Honglin Zhu. gh-90081: Run Python code in tracer/profiler function at full speed. Fixes slowdown in earlier versions of 3.11.
Read more >python3-usb_1.0.0-1_all.deb Ubuntu 18.04 LTS Download
This version of python-usb is written entirely in Python and uses ctypes to interact with various USB libraries This package contains the Python...
Read more >Bug listing with status RESOLVED with resolution TEST ...
... Bug:14720 - "libsafe-2.0.16.ebuild (New Package)" status:RESOLVED ... "imlib2 emerge fails with libtool.m4 and ltmain.sh have a version mismatch!
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mgeier this fixed it.
I guess at some point I used pip to upgrade
cffi
. Removing it viapip
and installing it viaapt-get install python3-cffi
seemed to fix the problem on Ubuntu 16.04.Thanks. Maybe this will help someone else.
@Teque5 You should probably not remove
python3-cffi-backend
if other needed packages depend on it.You should try to remove the version of the
cffi
module which you previously installed withpip
, and just use the one coming with Ubuntu.Run this multiple times, until it says there is no package with that name (or that it won’t uninstall the one in
/usr/lib/python3/dist-packages/
):If it still doesn’t work, have a look if the directory
/usr/local/lib/python3.5/dist-packages/cffi/
still exists and manually delete it.