背景
我尝试在服务器上运行几个Python脚本已经有一段时间了,但是每次我都会收到以下错误:
Traceback (most recent call last):
File "config.py", line 1, in <module>
from cassandra.cluster import Cluster
ImportError: No module named cassandra.cluster我假设这与卡桑德拉驱动程序没有安装有关,但是当我运行时:
pip install cassandra-driver我收到以下输出:
Collecting cassandra-driver
Requirement already satisfied: futures in /home/ubilab/.local/lib/python2.7/site-packages (from cassandra-driver) (3.2.0)
Requirement already satisfied: six>=1.9 in /usr/local/lib/python2.7/dist-packages (from cassandra-driver) (1.11.0)
Installing collected packages: cassandra-driver
Successfully installed cassandra-driver-3.16.0问题
我假设现在已经安装了驱动程序,但是当我再次运行脚本时,我会收到一个新的错误:
Traceback (most recent call last):
File "config.py", line 1, in <module>
from cassandra.cluster import Cluster
ImportError: /usr/local/lib/python2.7/dist-packages/cassandra/cluster.so: undefined symbol: PyFPE_jbuf我不知道如何修复它或者另一种下载驱动程序的方法?如果有人遇到这个错误,你能做些什么来解决它?我删除了包含错误的目录,但是如果删除它,脚本就会中断,因为它需要Cassandra将数据加载到。任何投入都是很好的。
更多背景信息
谢谢,一个苦苦挣扎的软件开发人员:)
发布于 2018-11-30 16:08:33
我想你应该尝试重新安装Cassandra驱动程序:
pip install cassandra-driver --no-binary :all:发布于 2019-10-03 07:48:24
看起来好像有一些相互冲突的包在:
/usr/local/lib/python2.7/dist-packages/cassandra/cluster.so未定义符号: PyFPE_jbuf错误是由于目录中的包损坏造成的。
为了解决这个问题,cd到cassandra目录并删除该文件夹。你可以这样做:
cd /usr/local/lib/python2.7/dist-packages/cassandra
sudo rm -rf cluster.so这将解决这个问题。
https://stackoverflow.com/questions/53527389
复制相似问题