cluster.cpython-34m.so: undefined symbol: PyException_Check [duplicate]

。_饼干妹妹 提交于 2019-12-13 08:26:11

问题


I am running a simple python(3.4.3) flask app on amazon linux, which uses datastax cassandra-driver(3.6). My application is failing to 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

回答1:


Latest version of Cython (0.25) released today broke cassandra-driver.

Workaround for this issue it to install Cython==0.24.1 before installing cassandra-driver.

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

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

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

See https://datastax-oss.atlassian.net/browse/PYTHON-656 for more information



来源:https://stackoverflow.com/questions/40257850/cluster-cpython-34m-so-undefined-symbol-pyexception-check

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!