cql 是否支持 python 3?

rab*_*bit 2 python thrift cql cassandra python-3.x

cql 是否支持python3?

我尝试使用 pip 安装,但失败了。

rabit@localhost:/usr/bin> pip-3.3 install cql
^CDownloading/unpacking cql
Operation cancelled by user
Storing complete log in /home/rabit/.pip/pip.log
rabit@localhost:/usr/bin> sudo pip-3.3 install cql
root's password:
Downloading/unpacking cql
  Downloading cql-1.4.0.tar.gz (76kB): 76kB downloaded
  Running setup.py egg_info for package cql

Downloading/unpacking thrift (from cql)
  Running setup.py egg_info for package thrift
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-build/thrift/setup.py", line 45
        except DistutilsPlatformError, x:
                                     ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip-build/thrift/setup.py", line 45

    except DistutilsPlatformError, x:

                                 ^

SyntaxError: invalid syntax

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/thrift
Run Code Online (Sandbox Code Playgroud)

事实上,cql 依赖于 Thrift,它可能不支持 python3

有什么解决办法吗??

Len*_*bro 5

Thrift 确实明确不支持 Python 3,它的元数据被标记为仅支持 Python 2,安装它会给你一个语法错误。

解决方案是联系 Thrift 的作者并帮助他们移植到 Python 3。一旦完成,请帮助端口 cql。更新通常很容易(某些特殊情况除外)而且很有趣!