Cluster.cpython-34m.so: undefined character: PyException_Check

I am running a simple python (3.4.3) flask application on amazon linux that uses datastax cassandra-driver (3.6). My application does not import the module.

Traceback (most recent call last): File "application.py", line 12, in <module> from cassandra.cluster import Cluster ImportError: /opt/python/run/venv/local/lib64/python3.4/site-packages/cassandra/cluster.cpython-34m.so: undefined symbol: PyException_Check (venv)[ ec2-user@ip-1-1-1-1 app]$ uname -a Linux ip-1-1-1-1 4.4.15-25.57.amzn1.x86_64 #1 SMP Wed Jul 27 22:37:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Other Packages installed: $ pip freeze cassandra-driver==3.6.0 click==6.6 Flask==0.11 itsdangerous==0.24 Jinja2==2.8 MarkupSafe==0.23 six==1.10.0 Werkzeug==0.11.11 xmltodict==0.10.2 
0
source share
1 answer

The latest version of Cython (0.25) released today broke the cassandra-driver.

A workaround for this problem is to set Cython == 0.24.1 before installing the cassandra driver.

(env) $ pip install Cython==0.24.1 (env) $ pip install cassandra-driver

You may need to first remove the existing cassandra-driver package from the site packages:

rm -r $WHERE_PYTHON_IS_INSTALLED/lib/python2.7/site-packages/cassandra*

Read more about https://datastax-oss.atlassian.net/browse/PYTHON-656

+3
source

Source: https://habr.com/ru/post/1011699/


All Articles