我有Python3.4.2,我尝试用windows 8在我的PC上安装pysqlcipher。
git clone https://github.com/leapcode/pysqlcipher/
cd pysqlcipher
python setup.py build_sqlcipher我得到了以下错误:
File "setup.py", line 64
print "CFLAGS", os.environ['CFLAGS']
^
SyntaxError: Missing parentheses in call to 'print'这似乎是印刷品的问题。我有Python3.4.2,这里使用的打印语法对应于Python2.x,我做了很多搜索,但没有找到任何解决方案。
有人知道如何用Python3.4.2?安装Python密码吗?
谢谢你的帮助!
PS:,我已经跟踪了这个教程,所有指示的事情都已经完成了。
发布于 2015-02-25 10:13:34
看起来这段代码是为Python2.Python编写的,Python 3包含了一些可以使某些Python 2与Python 3不兼容的更改。
您可以使用包含的2to3工具将setup.py和cross_bdist_wininst.py转换为兼容python3的代码。
只需运行2to3 -w setup.py和2to3 -w cross_bdist_wininst.py来转换python代码。自动转换工作得很好,但它确实遗漏了一个必要的转换。更改setup.py中的209行
-- if sources is None or type(sources) not in (ListType, TupleType):
++ if sources is None or type(sources) not in (List, Tuple):并删除第30行:
-- from types import ListType, TupleType这将允许您编译使用python setup.py build_sqlcipher的
https://stackoverflow.com/questions/28715630
复制相似问题