2013-06-30 134 views
1

cql是否支持python3?cql是否支持python 3?

我試圖用pip安裝,但失敗了。

[email protected]:/usr/bin> pip-3.3 install cql 
^CDownloading/unpacking cql 
Operation cancelled by user 
Storing complete log in /home/rabit/.pip/pip.log 
[email protected]:/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取決於節儉這可能不支持python3

任何解決方案??

+0

「It failed」不是有用的錯誤描述。 –

+1

我已更新帖子 – rabit

回答

3

Thrift確實明確不支持Python 3,它的元數據被標記爲僅支持Python 2,並且安裝它會給您一個語法錯誤。

解決方法是聯繫Thrift的作者並幫助他們port to Python 3。一旦完成,請幫助端口cql。更新通常很容易(除了在某些特殊情況下)和樂趣!

+0

Lennart在那裏您自己的書很好的微妙鏈接。 :-P –

+1

@MartijnPieters謝謝。 :-)這是最好的資源,而且是免費的! :-) –

2

沒有,cql與Python 3。它依賴於thrift,一包是的Python 3兼容兼容本身:

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 syntax 

cql本身使用相同的過時的語法cqltypes.py

except (ValueError, AssertionError, IndexError), e: 

兩個thriftcql需要首先被移植。