You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On systems that have Cassandra installed, this causes cqlsh to use the cassandra-driver that was installed with the cassandra RPM in preference to the one included in the venv.
In our case, this causes a failure because the cassandra-driver included with Cassandra 3.11.15 in /usr/share/cassandra/lib is not compatible with Python 3.10.
$ cqlsh
Traceback (most recent call last):
File "/some/venv/bin/cqlsh", line 5, in <module>
from cqlsh.__main__ import main
File "/some/venv/lib/python3.10/site-packages/cqlsh/__main__.py", line 3, in <module>
from cqlsh.cqlsh import main as cqlsh_main
File "/some/venv/lib/python3.10/site-packages/cqlsh/cqlsh.py", line 134, in <module>
from cassandra.cluster import Cluster
File "/usr/share/cassandra/lib/cassandra-driver-internal-only-3.11.0-bb96859b.zip/cassandra-driver-3.11.0-bb96859b/cassandra/cluster.py", line 22, in <module>
ImportError: cannot import name 'Mapping' from 'collections' (python3.10.13-cp310-cp310-manylinux2014_x86_64/squashfs-root/opt/python3.10/lib/python3.10/collections/__init__.py)
$
To get around this, we set CQLSH_NO_BUNDLED=1 which disables this behavior... but it seems like when repackaging cqlsh, you should comment out these two lines instead.
The text was updated successfully, but these errors were encountered:
In cqlsh/cqlsh.py, there's this bit:
On systems that have Cassandra installed, this causes cqlsh to use the cassandra-driver that was installed with the cassandra RPM in preference to the one included in the venv.
In our case, this causes a failure because the cassandra-driver included with Cassandra 3.11.15 in /usr/share/cassandra/lib is not compatible with Python 3.10.
To get around this, we set
CQLSH_NO_BUNDLED=1
which disables this behavior... but it seems like when repackaging cqlsh, you should comment out these two lines instead.The text was updated successfully, but these errors were encountered: