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实际上,cql依赖于Thrift,它可能不支持python3。
有什么解决方案吗?
发布于 2013-06-30 20:33:09
Thrift确实明确地不支持Python3,它的元数据被标记为只支持Python2,安装它会给你一个语法错误。
解决方案是联系Thrift的作者,帮助他们进行port to Python 3。完成后,帮助端口cql。更新通常很简单(除了在某些特殊情况下)和乐趣!
发布于 2013-06-30 20:32:26
不,cql库是与Python3不兼容的。它依赖于thrift,这是一个本身与Python3不兼容的包:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/Users/mj/Development/venvs/stackoverflow-3.3/build/thrift/setup.py", line 45
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntaxcql本身在cqltypes.py中使用相同的过时语法
except (ValueError, AssertionError, IndexError), e:thrift和cql都需要首先移植。
发布于 2014-09-15 19:55:28
对于Python3,您可以使用CQLEngine。
https://stackoverflow.com/questions/17390367
复制相似问题